2022-09-19 03:17:52

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the libata tree

Hi all,

After merging the libata tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/ata/ahci_st.c: In function 'st_ahci_probe':
drivers/ata/ahci_st.c:147:24: warning: unused variable 'dev' [-Wunused-variable]
147 | struct device *dev = &pdev->dev;
| ^~~

Introduced by commit

3f74cd046fbe ("ata: libahci_platform: Parse ports-implemented property in resources getter")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-09-19 08:41:45

by Damien Le Moal

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the libata tree

On 9/19/22 11:40, Stephen Rothwell wrote:
> Hi all,
>
> After merging the libata tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> drivers/ata/ahci_st.c: In function 'st_ahci_probe':
> drivers/ata/ahci_st.c:147:24: warning: unused variable 'dev' [-Wunused-variable]
> 147 | struct device *dev = &pdev->dev;
> | ^~~
>
> Introduced by commit
>
> 3f74cd046fbe ("ata: libahci_platform: Parse ports-implemented property in resources getter")
>

Serge,

Can you send an incremental fix for this ? If not possible, I will do it.

--
Damien Le Moal
Western Digital Research

2022-09-20 00:18:57

by Damien Le Moal

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the libata tree

On 9/19/22 11:40, Stephen Rothwell wrote:
> Hi all,
>
> After merging the libata tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>
> drivers/ata/ahci_st.c: In function 'st_ahci_probe':
> drivers/ata/ahci_st.c:147:24: warning: unused variable 'dev' [-Wunused-variable]
> 147 | struct device *dev = &pdev->dev;
> | ^~~
>
> Introduced by commit
>
> 3f74cd046fbe ("ata: libahci_platform: Parse ports-implemented property in resources getter")
>

I pushed a fix for this. I also added a dependency on COMPILE_TEST for
this driver to avoid a repeat in the future.

Thanks.

--
Damien Le Moal
Western Digital Research

2022-09-20 19:42:04

by Serge Semin

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the libata tree

Hello Damien

On Tue, Sep 20, 2022 at 08:56:53AM +0900, Damien Le Moal wrote:
> On 9/19/22 11:40, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the libata tree, today's linux-next build (arm
> > multi_v7_defconfig) produced this warning:
> >
> > drivers/ata/ahci_st.c: In function 'st_ahci_probe':
> > drivers/ata/ahci_st.c:147:24: warning: unused variable 'dev' [-Wunused-variable]
> > 147 | struct device *dev = &pdev->dev;
> > | ^~~
> >
> > Introduced by commit
> >
> > 3f74cd046fbe ("ata: libahci_platform: Parse ports-implemented property in resources getter")
> >
>

> I pushed a fix for this. I also added a dependency on COMPILE_TEST for
> this driver to avoid a repeat in the future.

I'm sorry for not delivering a quick response to the request. Thanks
for sending the fix. Indeed the dev variable should have been dropped.
I should have checked that after removing a part of the code some
variables could be left unused.

-Sergey

>
> Thanks.
>
> --
> Damien Le Moal
> Western Digital Research
>