mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tangbin <tangbin@cmss.chinamobile.com>
To: Mark Brown <broonie@kernel.org>
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 <zhangshengju@cmss.chinamobile.com>
Subject: Re: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in theprobe function
Date: Wed, 11 Aug 2021 20:09:00 +0800	[thread overview]
Message-ID: <7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com> (raw)
In-Reply-To: <20210811115846.GC4167@sirena.org.uk>

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




  reply	other threads:[~2021-08-11 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 11:55 [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function Tang Bin
2021-08-11 11:58 ` Mark Brown
2021-08-11 12:09   ` tangbin [this message]
2021-08-11 12:19     ` [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in theprobe function Mark Brown
2021-08-11 12:28       ` [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function tangbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ddb13ee-2ca6-bf8d-2a83-9896d29176c5@cmss.chinamobile.com \
    --to=tangbin@cmss.chinamobile.com \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=zhangshengju@cmss.chinamobile.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®