[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2196e55-6458-4f55-96ac-bd18ecb461d1@cmss.chinamobile.com>
Date: Thu, 27 Aug 2020 09:37:37 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: Mark Brown <broonie@...nel.org>
Cc: timur@...nel.org, lgirdwood@...il.com, perex@...ex.cz,
tiwai@...e.com, alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: fsl_spdif: Fix unnecessary check
infsl_spdif_probe()
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
Powered by blists - more mailing lists