[PATCH v3 2/2] soc: imx8m: Remove global soc_uid
Marek Vasut
marex at denx.de
Fri Sep 27 13:05:13 PDT 2024
On 9/27/24 6:58 PM, Frank Li wrote:
> On Thu, Sep 26, 2024 at 11:36:52PM +0200, Marek Vasut wrote:
>> The static global soc_uid is only ever used as kasprintf() parameter in
>> imx8m_soc_probe(). Pass pointer to local u64 variable to .soc_revision()
>> callback instead and let the .soc_revision() callback fill in the content.
>> Remove the unnecessary static global variable.
>
> Can you simple said:
>
> Remove the unnecessary static global variable 'soc_uid', which only used
> in imx8m_soc_probe().
I believe it is better to be a bit more verbose in the commit description.
>> @@ -215,10 +213,11 @@ static __maybe_unused const struct of_device_id imx8_soc_match[] = {
>> static int imx8m_soc_probe(struct platform_device *pdev)
>> {
>> struct soc_device_attribute *soc_dev_attr;
>> - struct soc_device *soc_dev;
>> + const struct imx8_soc_data *data;
>> const struct of_device_id *id;
>> + struct soc_device *soc_dev;
>> u32 soc_rev = 0;
>> - const struct imx8_soc_data *data;
>> + u64 soc_uid = 0;
>
> unnecessary this these orders in this patch.
I can spin the sorting into separate patch if that's really required.
More information about the linux-arm-kernel
mailing list