2016-07-20 02:25:06

by Stephen Rothwell

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

Hi all,

After merging the wireless-drivers-next tree, today's linux-next build
(x86_64 allmodconfig) produced this warning:

drivers/net/wireless/ti/wlcore/spi.c: In function 'wlcore_probe_of':
drivers/net/wireless/ti/wlcore/spi.c:457:6: warning: unused variable 'ret' [-Wunused-variable]
int ret;
^

Introduced by commit

01efe65aba65 ("wlcore: spi: add wl18xx support")

--
Cheers,
Stephen Rothwell


2016-07-08 01:35:12

by Stephen Rothwell

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

Hi all,

On Fri, 8 Jul 2016 11:32:14 +1000 Stephen Rothwell <[email protected]> wrote:
>
> After merging the wireless-drivers-next tree, today's linux-next build
> (arm multi_v7_defconfig, x86_64 allmodconfig) produced this warning:
>
> drivers/net/wireless/marvell/mwifiex/scan.c: In function 'mwifiex_cancel_scan':
> drivers/net/wireless/marvell/mwifiex/scan.c:2031:44: warning: passing argument 2 of 'cfg80211_scan_done' makes pointer from integer without a cast [-Wint-conversion]
> cfg80211_scan_done(priv->scan_request, 1);
> ^
> In file included from include/net/mac80211.h:23:0,
> from drivers/net/wireless/marvell/mwifiex/decl.h:30,
> from drivers/net/wireless/marvell/mwifiex/scan.c:20:
> include/net/cfg80211.h:4104:6: note: expected 'struct cfg80211_scan_info *' but argument is of type 'int'
> void cfg80211_scan_done(struct cfg80211_scan_request *request,
> ^
>
> Introduced by commit
>
> a9c790ba23eb ("mwifiex: factor out mwifiex_cancel_scan")
>
> interacting with commit
>
> 1d76250bd34a ("nl80211: support beacon report scanning")
>
> from the net-next (and mac80211-next) tree.
>
> This will need some merge fix patch ... please send me or Dave one.

Of course, this is the conflict I reported against the mac80211-next
tree yesterday (the memory fades :-)) ... I will move the merge fix
patch from that tree to this one.

--
Cheers,
Stephen Rothwell

2016-07-20 18:41:54

by Kalle Valo

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

"Reizer, Eyal" <[email protected]> writes:

>> After merging the wireless-drivers-next tree, today's linux-next build
>> (x86_64 allmodconfig) produced this warning:
>>
>> drivers/net/wireless/ti/wlcore/spi.c: In function 'wlcore_probe_of':
>> drivers/net/wireless/ti/wlcore/spi.c:457:6: warning: unused variable 'ret' [-
>> Wunused-variable]
>> int ret;
>> ^
>>
>> Introduced by commit
>>
>> 01efe65aba65 ("wlcore: spi: add wl18xx support")
>
> Of course you are right. It is indeed redundant now. Don't know how I
>have missed it. Don't remember seeing a warning from the tool chain I
>have used. Anyway ,will submit an amended patch soon.

I didn't notice it either as I didn't have CONFIG_WLCORE_SPI enabled.
But what's odd is that kbuild didn't report anything, it's usually quite
good to catch warnings like this.

Anyway, I have pushed the fix to wireless-drivers-next:

cb6a11518850 wlcore: spi: fix build warning caused by redundant variable

--
Kalle Valo

2016-07-20 06:18:09

by Reizer, Eyal

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

Hi Stephen,

>
> After merging the wireless-drivers-next tree, today's linux-next build
> (x86_64 allmodconfig) produced this warning:
>
> drivers/net/wireless/ti/wlcore/spi.c: In function 'wlcore_probe_of':
> drivers/net/wireless/ti/wlcore/spi.c:457:6: warning: unused variable 'ret' [-
> Wunused-variable]
> int ret;
> ^
>
> Introduced by commit
>
> 01efe65aba65 ("wlcore: spi: add wl18xx support")
>
Of course you are right. It is indeed redundant now.
Don't know how I have missed it. Don't remember seeing a warning from the tool chain I have used.
Anyway ,will submit an amended patch soon.

Best Regards,
Eyal

2016-11-28 12:26:11

by Jes Sorensen

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

Kalle Valo <[email protected]> writes:
> Barry Day <[email protected]> writes:
>
>> On Mon, Nov 28, 2016 at 09:25:30AM +0200, Kalle Valo wrote:
>>> Stephen Rothwell <[email protected]> writes:
>>>
>>> > Hi all,
>>> >
>>> > After merging the wireless-drivers-next tree, today's linux-next build
>>> > (x86_64 allmodconfig) produced this warning:
>>> >
>>> > In file included from include/linux/usb/ch9.h:35:0,
>>> > from include/linux/usb.h:5,
>>> > from drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:32:
>>> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
>>> > include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>> > #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
>>> > ^
>>> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4841:6: note: 'rate' was declared here
>>> > u32 rate;
>>> > ^
>>> >
>>> > Introduced by commit
>>> >
>>> > b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count")
>>> >
>>> > This is a correct diagnosis.
>>>
>>> Thanks for the report. Jes, can you send a patch to fix this? (Unless
>>> someone else beats to it.)
>>>
>>> --
>>> Kalle Valo
>>
>> I posted a patch on the 26th that fixes this
>
> Thanks, I see it:
>
> https://patchwork.kernel.org/patch/9448225/
>
> The commit log doesn't mention anything about the compilation warning,
> I'll add that. Also a Fixes line is nice to have.

I'm happy with this fix

Acked-by: Jes Sorensen <[email protected]>

2016-11-28 07:25:36

by Kalle Valo

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

Stephen Rothwell <[email protected]> writes:

> Hi all,
>
> After merging the wireless-drivers-next tree, today's linux-next build
> (x86_64 allmodconfig) produced this warning:
>
> In file included from include/linux/usb/ch9.h:35:0,
> from include/linux/usb.h:5,
> from drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:32:
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
> include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
> #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
> ^
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4841:6: note: 'rate' was declared here
> u32 rate;
> ^
>
> Introduced by commit
>
> b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count")
>
> This is a correct diagnosis.

Thanks for the report. Jes, can you send a patch to fix this? (Unless
someone else beats to it.)

--
Kalle Valo

2016-11-28 08:25:20

by Barry Day

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

On Mon, Nov 28, 2016 at 09:25:30AM +0200, Kalle Valo wrote:
> Stephen Rothwell <[email protected]> writes:
>
> > Hi all,
> >
> > After merging the wireless-drivers-next tree, today's linux-next build
> > (x86_64 allmodconfig) produced this warning:
> >
> > In file included from include/linux/usb/ch9.h:35:0,
> > from include/linux/usb.h:5,
> > from drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:32:
> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
> > include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
> > ^
> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4841:6: note: 'rate' was declared here
> > u32 rate;
> > ^
> >
> > Introduced by commit
> >
> > b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count")
> >
> > This is a correct diagnosis.
>
> Thanks for the report. Jes, can you send a patch to fix this? (Unless
> someone else beats to it.)
>
> --
> Kalle Valo

I posted a patch on the 26th that fixes this

Barry

2016-11-28 11:44:50

by Kalle Valo

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

Barry Day <[email protected]> writes:

> On Mon, Nov 28, 2016 at 09:25:30AM +0200, Kalle Valo wrote:
>> Stephen Rothwell <[email protected]> writes:
>>
>> > Hi all,
>> >
>> > After merging the wireless-drivers-next tree, today's linux-next build
>> > (x86_64 allmodconfig) produced this warning:
>> >
>> > In file included from include/linux/usb/ch9.h:35:0,
>> > from include/linux/usb.h:5,
>> > from drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:32:
>> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
>> > include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> > #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
>> > ^
>> > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4841:6: note: 'rate' was declared here
>> > u32 rate;
>> > ^
>> >
>> > Introduced by commit
>> >
>> > b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count")
>> >
>> > This is a correct diagnosis.
>>
>> Thanks for the report. Jes, can you send a patch to fix this? (Unless
>> someone else beats to it.)
>>
>> --
>> Kalle Valo
>
> I posted a patch on the 26th that fixes this

Thanks, I see it:

https://patchwork.kernel.org/patch/9448225/

The commit log doesn't mention anything about the compilation warning,
I'll add that. Also a Fixes line is nice to have.

--
Kalle Valo