Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4401650pxt; Wed, 11 Aug 2021 05:22:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWYGZbsHtoXRUw6Catnv0uZcXNzAh+jYT5j39Ci7Y1kzbcf7PpecXiwArJpIBr4QriJ8KD X-Received: by 2002:a17:907:6297:: with SMTP id nd23mr3312209ejc.62.1628684551406; Wed, 11 Aug 2021 05:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628684551; cv=none; d=google.com; s=arc-20160816; b=nq/yx8jr9QYKerLLXlhkycFLVsxrTclAtadVLLHyX5YUzr04lEe8t3yUCYoG/f49K+ /tXSsNgJIis84x5VzlZt1z/7wymHqUvSnmPdvyy8DfV3JWzLW1YDe1b1mHCbgND/v1uX Pok11tz5xWKTtFZUVtS6HdkENyNtn/TCZfealCjfp8esci2BKvBBbABA+JhsncKAZx2v q4PQX8mLPB4ayLEPmKEFkFvslriJjbzTLL+WrdggWo0TMJHTzPpJahoDzwM+tNsaW7EI Nq9nh83KyXTCNWlSwHIMyfPEySeQLf9+zDvwcO/A03guCOUbc44IF9Gl0EaNFLMjYsgR E6lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=m3PPPcJWDv8Gzldsj2r4hfIvI0ZymEb+vVAXnL42550=; b=G4nC2FTy5DldwYhlqmtQFqggg/lkjMZiO0bA/EO8O8biNey59/cAfDqE74IfnJVxY3 uBPM83d4CGX21BQ4zQntvROq7XHoiLnvMZUwStHsZ8jSqm0URPFmfcQ6KZHbNoInG5Z2 L+wVEjj7748K7WbZJ8ZfdB9/f8edKKWN/FJvE81x7Ylv2T544Db6tm6cRTk9nwABuM8G /MrGNARAuJD2PFYQXpEgEhXKUBKFjqjFigEuUM4kuR8pBEGZCoXE4B/KUjm9e5PGroyO CyNLvE6CeESxqXpiCMDNhq7UU1Z9EcMq3ff4zhfIWUnJ9ehlQYY8Bk1BQCdWfccQc20o CksA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RNw8VvFt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 22si22675420ejw.427.2021.08.11.05.22.07; Wed, 11 Aug 2021 05:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RNw8VvFt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237312AbhHKMUl (ORCPT + 99 others); Wed, 11 Aug 2021 08:20:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:52968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbhHKMUh (ORCPT ); Wed, 11 Aug 2021 08:20:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B97746023B; Wed, 11 Aug 2021 12:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628684414; bh=Jkyif3d4kFjhIKg6jx01Qag1Q6rqMPw9mCrQuXo745E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RNw8VvFtn2G6ichHLHzmKNVwo6zy4RUIiOQNdZ58LxRx4M0kZ/kbsqVo+69ZfFnYq O7gtmpGM+7ggMv4dLWanhE2b/VUAAF/8/jdr0Cda3Kvo7bFiridVaJ1BMUNrLC7C5R TvHjDuz9GEh+yy+9m88QpYPNsZEeKP9nkTvQqKcKCNzrByKXs4BDtKTPn6WDwN3585 ENA73ygZZww79IlugxoI8udwiCRua7z7AHjyJV7cZafQR53Kz9IMxy3LJypQaMDawe ZNZMliSWXYEEZDeSy2GzO3YRBOGag0WywFgncn/WH2uJmZvGzrcTNwudz2Cm60HWlK JvPShRDkBHfyw== Date: Wed, 11 Aug 2021 13:19:55 +0100 From: Mark Brown To: tangbin Cc: olivier.moysan@foss.st.com, arnaud.pouliquen@foss.st.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Zhang Shengju Subject: Re: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in theprobe function Message-ID: <20210811121955.GD4167@sirena.org.uk> References: <20210811115523.17232-1-tangbin@cmss.chinamobile.com> <20210811115846.GC4167@sirena.org.uk> <7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n/aVsWSeQ4JHkrmm" Content-Disposition: inline In-Reply-To: <7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com> X-Cookie: To stay youthful, stay useful. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --n/aVsWSeQ4JHkrmm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 11, 2021 at 08:09:00PM +0800, tangbin wrote: > On 2021/8/11 19:58, Mark Brown wrote: > > On Wed, Aug 11, 2021 at 07:55:23PM +0800, Tang Bin wrote: > > > The function stm32_spdifrx_parse_of() is only called by the function > > > stm32_spdifrx_probe(), and the probe function is only called with > > > an openfirmware platform device. Therefore there is no need to check > > > the device_node in probe function. > > What is the benefit of not doing the check? It seems like reasonable > > defensive programming. > I think it's unnecessary, because we all know than the probe function is > only trigger if > the device and the driver matches, and the trigger mode is just Device Tree. > So the device_node > must be exist in the probe function if it works. That's the reason why I > think it's redundant. I see why it is redundant, I don't see what problem this redudnancy causes. --n/aVsWSeQ4JHkrmm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmETwGoACgkQJNaLcl1U h9Cj4Af/azfVQM3xU3CdmasVulqZpZWu39+iv+ISKhYAhqPkrw6tq6sFFfpDAAQX BAs2T83O5CvB4peKwgBRLs6paHkWbWnftWMLCVrUfMzEBfRRq6T/wLfQxmDA3o89 YRiXxOjTeZFwiWxRT+jVLh6S3QATZQBdoXU7jbqQH4rRIod5FXh8wdftLQQWm459 WmIQLpypjSCZYPpeCs+UdYs/TatHQdXD0ssS3k5m+Hq3MufufSDUgIpNJUA0aTf5 TfMTW+hMNnz9apT/9bVopicIh6Cf29Mr+O8gr9E7tdQYxNXIZD/MkcjucV8yW+Cu QFGgT4FSUrecnNJrnFUV8P39wsYkUQ== =f9BL -----END PGP SIGNATURE----- --n/aVsWSeQ4JHkrmm--