Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4407265pxt; Wed, 11 Aug 2021 05:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6mMO6AiOWxni7lNuoHCshE2dnZ/HR8jJaE71Tp1Vlbyb5adbChypA5E4gxcQUgDAfom41 X-Received: by 2002:a17:906:774f:: with SMTP id o15mr3439672ejn.200.1628685060874; Wed, 11 Aug 2021 05:31:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628685060; cv=none; d=google.com; s=arc-20160816; b=tHD2SE21O1nRnf9jEpTXrvXhM/Xs5eB2HTS7O19Oo/JPu1WcvVEt8zvHAKc7lhEzqY +de5mHpwNq2m4coc8BXXL8nbCYRy5ytSW1n3GIhvaqKdE2CIUH6e1zS+RFy/6FXB4/3n d/az+8xnLkDl9ytizzh0X9XibifG/XmE4xomdaWfn3z4MreYmQAm3EdGPxLNHt60gi2a KLc23ltnHRfMTqNBzPpuV7xxhInPnP1J+Xo5ZlIRhS6PB69dFr4Iwx9vRstdX8TlFwjH nPy/0a7jSuNIaVTnQ4DSPZmw5NDuh39micNyBXJipWlFyZBGffgfVZ1Nx54CHR9vVbMM LhYQ== 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=/NF9MN6F1KjMNgW2r3SH2vk4l9Mi4EYuXtZiBm0Whf8=; b=PAAbsJC0IbQHHRDjA4kK3UnXZ/93AJtpvfuidaPVAq/37KSYUqy9lO8JNu+JdeD30x DSycUAhZthdlkiU+qrDyj54VnFyKTPxrG+2HveHDILw6fMy12LoqxaXN8bLamjhLtHGX V7Z60fKAJhZm6erKA5U1l/Rydl3IBtKA4ThuBxxU4wA27Sn57MigIik8kgMrVIrsiDwf /4fYtPdDIo7SRsXkYlTfvK++POy8esgCaKfAtUa9VwDXiHIDl9alYwRkmZT06d27MvII 9R5ZlBmWnKqwAHDmBTjPVMsKXW54i5O5FHmw1+zwv/vTydpe+Zd2bvoS6F9JSS4CcWus /NBA== 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 qo8si12293321ejb.637.2021.08.11.05.30.35; Wed, 11 Aug 2021 05:31:00 -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 S231591AbhHKM3l (ORCPT + 99 others); Wed, 11 Aug 2021 08:29:41 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:7983 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbhHKM3B (ORCPT ); Wed, 11 Aug 2021 08:29:01 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.7]) by rmmx-syy-dmz-app05-12005 (RichMail) with SMTP id 2ee56113c264abc-64bcd; Wed, 11 Aug 2021 20:28:22 +0800 (CST) X-RM-TRANSID: 2ee56113c264abc-64bcd X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from [192.168.26.114] (unknown[10.42.68.12]) by rmsmtp-syy-appsvr04-12004 (RichMail) with SMTP id 2ee46113c265114-3fc53; Wed, 11 Aug 2021 20:28:22 +0800 (CST) X-RM-TRANSID: 2ee46113c265114-3fc53 Subject: Re: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe 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 References: <20210811115523.17232-1-tangbin@cmss.chinamobile.com> <20210811115846.GC4167@sirena.org.uk> <7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com> <20210811121955.GD4167@sirena.org.uk> From: tangbin Message-ID: Date: Wed, 11 Aug 2021 20:28:23 +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: <20210811121955.GD4167@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 20:19, Mark Brown wrote: > 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. Maybe not, just be redundant. If you think that's ok, just drop this patch. I'm sorry to trouble you. Thanks Tang Bin