Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4395084pxt; Wed, 11 Aug 2021 05:13:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJXSCSmQPm2MMUCbo5oZPhtlcyo6k2KVyOoxbEn/hIOg1EX9JzYpeovrV5scWgzt3fSxUc X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr3385991eju.254.1628684003097; Wed, 11 Aug 2021 05:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628684003; cv=none; d=google.com; s=arc-20160816; b=Z9g4RQMIW8jehEczLHW0l0BTQY80gmhOnrFNJt9vo33q1fOSgrjphnonAiknsdRUu/ KA6lzS8o6YVT8rAqdisZRfG+tW/b5+bu+fBRDY7Qq2t94huVbIBf5rlxBQ5qno5qwVkn DpzarvaIvDdrIhkRwOYVtxKvo8i3XZw1xxDviWt7KvJ9r5bH9GaUtUUDSTjSHJVGPPvv CE9NEKyUb063ZyZhYCmAHdwKefZ6EeL/DxH8XTsA1nDtLpzuZ725zvrfjFiuKmkAe6gO 6AQ2AByQl9n6Eopkr0IVac0muS4EChlcFqMSvlJuaeSSJIWqq+fixPeyP5dU0bg/+Ry+ X24Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=owHCjKOm1NriOJCB9eWIhj57WwfuL7Tp1dD47Q9Iwwo=; b=EozXmEUgT/GAPIDfXaxlelfvnRsjXaJ/e8dOQ2N6TSaVNPXSDKuog6nsaYM/rDTjSs 71Is1RYyNTguSzN592Rr7rAQyz8L9DZnUBvrMMgemLtlZxhVfbHqZqvJgHKGimcKKGnF H3v08GPRdsonXrVC1564vOFtRfaXAZZ9HuOilWgsk987foUlluVb2XI7ueUerLfo33Tg HSts9STAjm/X2H8Zx2+ZXIIynYPzmaA8aGhQJgbQPzoPscbqWBSFDvFrYJXEcwlHR1y3 gwp0/dmBqP2UNYhdmMrRCL9EybHiT/JR9T8utnHaxGGE8147waME3m5khHf+s3sdTpPn K3aw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb42si5241526ejc.233.2021.08.11.05.12.58; Wed, 11 Aug 2021 05:13:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbhHKMJ0 (ORCPT + 99 others); Wed, 11 Aug 2021 08:09:26 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:44180 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233101AbhHKMJ0 (ORCPT ); Wed, 11 Aug 2021 08:09:26 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app01-12001 (RichMail) with SMTP id 2ee16113bdd84ea-643d2; Wed, 11 Aug 2021 20:09:00 +0800 (CST) X-RM-TRANSID: 2ee16113bdd84ea-643d2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.26.114] (unknown[10.42.68.12]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee36113bdda490-3ef9f; Wed, 11 Aug 2021 20:09:00 +0800 (CST) X-RM-TRANSID: 2ee36113bdda490-3ef9f Subject: Re: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in theprobe function To: Mark Brown 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 References: <20210811115523.17232-1-tangbin@cmss.chinamobile.com> <20210811115846.GC4167@sirena.org.uk> From: tangbin Message-ID: <7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com> Date: Wed, 11 Aug 2021 20:09:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20210811115846.GC4167@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark: 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. Thanks Tang Bin