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
Subject: Re: [PATCH] ASoC: stm32: spdifrx: Delete unnecessary check in the probe function
Date: Wed, 11 Aug 2021 20:28:23 +0800	[thread overview]
Message-ID: <d0fa7aa5-b64b-7d4a-a80d-ec2f6dec5712@cmss.chinamobile.com> (raw)
In-Reply-To: <20210811121955.GD4167@sirena.org.uk>

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




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

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

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=d0fa7aa5-b64b-7d4a-a80d-ec2f6dec5712@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 \
    /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®