From: Tang Bin <tangbin@cmss.chinamobile.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, timur@kernel.org,
linux-kernel@vger.kernel.org, tiwai@suse.com,
lgirdwood@gmail.com, perex@perex.cz,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] ASoC: fsl_spdif: Fix unnecessary check infsl_spdif_probe()
Date: Thu, 27 Aug 2020 09:37:37 +0800 [thread overview]
Message-ID: <f2196e55-6458-4f55-96ac-bd18ecb461d1@cmss.chinamobile.com> (raw)
In-Reply-To: <20200826165308.GJ4965@sirena.org.uk>
Hi Mark
在 2020/8/27 0:53, Mark Brown 写道:
> On Wed, Aug 26, 2020 at 11:09:18PM +0800, Tang Bin wrote:
>> The function fsl_spdif_probe() is only called with an openfirmware
>> platform device. Therefore there is no need to check that the passed
>> in device is NULL.
> Why is this an issue - the check will make things more robust if someone
> manages to load the driver on a non-DT system and otherwise costs us a
> couple of instructions?
Thanks for your reply.
In this function, function fsl_spdif_probe() can be triggered only if
the platform_device and platform_driver matches,
so I think the judgement at the beginning is redundant.
Thanks
Tang Bin
next prev parent reply other threads:[~2020-08-27 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 15:09 [PATCH] ASoC: fsl_spdif: Fix unnecessary check in fsl_spdif_probe() Tang Bin
2020-08-26 16:53 ` Mark Brown
2020-08-27 1:37 ` Tang Bin [this message]
2020-10-01 22:46 ` Mark Brown
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=f2196e55-6458-4f55-96ac-bd18ecb461d1@cmss.chinamobile.com \
--to=tangbin@cmss.chinamobile.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=perex@perex.cz \
--cc=timur@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).