Message ID | 333d56f0-ef24-4946-958d-e804cf9c733b@RTEXMBS04.realtek.com.tw (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | pull-request: rtw-next-2024-05-04 | expand |
Ping-Ke Shih <pkshih@realtek.com> wrote: > Hi, > > A pull-request of rtw-next to wireless-next tree, more info below. Please > let me know if any problems. > > Thanks > Ping-Ke I see a new warning with GCC 13.2. Please fix this and send a new pull request. In file included from ./include/linux/fortify-string.h:5, from ./include/linux/string.h:369, from ./include/linux/bitmap.h:13, from ./include/linux/cpumask.h:13, from ./include/linux/sched.h:16, from drivers/net/wireless/realtek/rtlwifi/rtl8192d/../wifi.h:9, from drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:4: In function 'le32p_replace_bits', inlined from 'rtl92de_update_hal_rate_mask.isra' at drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2: ./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used uninitialized [-Wuninitialized] 189 | *p = (*p & ~to(field)) | type##_encode_bits(val, field); \ | ^~ ./include/linux/bitfield.h:196:9: note: in expansion of macro '____MAKE_OP' 196 | ____MAKE_OP(le##size,u##size,cpu_to_le##size,le##size##_to_cpu) \ | ^~~~~~~~~~~ ./include/linux/bitfield.h:201:1: note: in expansion of macro '__MAKE_OP' 201 | __MAKE_OP(32) | ^~~~~~~~~ drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c: In function 'rtl92de_update_hal_rate_mask.isra': drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:863:37: note: 'rate_mask' declared here 863 | struct rtl92d_rate_mask_h2c rate_mask; | ^~~~~~~~~ Patch set to Changes Requested.
On Sat, 2024-05-04 at 07:10 +0000, Kalle Valo wrote: > > drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2: > ./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used uninitialized [-Wuninitialized] > I have updated gcc to 13.2.1 (local build), but still can't see this warning. Then, I force to add -Wuninitialized and delete -Wno-maybe-uninitialized locally, and I can see this warning (but -Wmaybe-uninitialized instead). I did suspect wireless-next tree does more compiler options, so I also tried to merge the tree, but still the same. To prevent blocking pull-request, I would make patch and send pull-request by your finding. I will continue to dig the cause afterward. Ping-Ke
Ping-Ke Shih <pkshih@realtek.com> writes: > On Sat, 2024-05-04 at 07:10 +0000, Kalle Valo wrote: >> >> drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2: >> ./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used >> uninitialized [-Wuninitialized] >> > > I have updated gcc to 13.2.1 (local build), but still can't see this warning. I'm not sure if you aware that crosstool provides an easy way to test different compilers. More info here: https://wireless.wiki.kernel.org/en/users/drivers/ath10k/codingstyle#tools > Then, I force to add -Wuninitialized and delete -Wno-maybe-uninitialized > locally, and I can see this warning (but -Wmaybe-uninitialized instead). > > I did suspect wireless-next tree does more compiler options, so I also > tried to merge the tree, but still the same. Weird, maybe it's due to different kconfig options? I have attached my .config which I use to compile test wireless trees. > To prevent blocking pull-request, I would make patch and send pull-request > by your finding. I will continue to dig the cause afterward. I don't see any warnings with v2 anymore. Thanks for the quick fix!
On Sat, 2024-05-04 at 16:38 +0300, Kalle Valo wrote: > > Ping-Ke Shih <pkshih@realtek.com> writes: > > > On Sat, 2024-05-04 at 07:10 +0000, Kalle Valo wrote: > > > drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2: > > > ./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used > > > uninitialized [-Wuninitialized] > > > > > > > I have updated gcc to 13.2.1 (local build), but still can't see this warning. > > I'm not sure if you aware that crosstool provides an easy way to test > different compilers. More info here: > > https://wireless.wiki.kernel.org/en/users/drivers/ath10k/codingstyle#tools I didn't know that before, and I use that convenient cross build now. :-) A question about GNUmakefile, it seems miss include Makefile Otherwise, 'make' told me no rules to make. > > > Then, I force to add -Wuninitialized and delete -Wno-maybe-uninitialized > > locally, and I can see this warning (but -Wmaybe-uninitialized instead). > > > > I did suspect wireless-next tree does more compiler options, so I also > > tried to merge the tree, but still the same. > > Weird, maybe it's due to different kconfig options? I have attached my > .config which I use to compile test wireless trees. Using your .config can reproduce the symptom, and then I try to bisect CONFIG_xxx. The cause is "CONFIG_DEBUG_SECTION_MISMATCH=y". My .config didn't have that. I also tried my original compiler that can also see the warning with new .config. > > > To prevent blocking pull-request, I would make patch and send pull-request > > by your finding. I will continue to dig the cause afterward. > > I don't see any warnings with v2 anymore. Thanks for the quick fix! > Thanks for your time on weekend. :-)
Ping-Ke Shih <pkshih@realtek.com> writes: > On Sat, 2024-05-04 at 16:38 +0300, Kalle Valo wrote: >> >> Ping-Ke Shih <pkshih@realtek.com> writes: >> >> > On Sat, 2024-05-04 at 07:10 +0000, Kalle Valo wrote: >> > > drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2: >> > > ./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used >> > > uninitialized [-Wuninitialized] >> > > >> > >> > I have updated gcc to 13.2.1 (local build), but still can't see this warning. >> >> I'm not sure if you aware that crosstool provides an easy way to test >> different compilers. More info here: >> >> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/codingstyle#tools > > > I didn't know that before, and I use that convenient cross build now. :-) There are also similar packages for clang: https://mirrors.edge.kernel.org/pub/tools/llvm/ > A question about GNUmakefile, it seems miss > > include Makefile > > Otherwise, 'make' told me no rules to make. Indeed, thanks for reporting that. I fixed now the wiki. >> > Then, I force to add -Wuninitialized and delete -Wno-maybe-uninitialized >> > locally, and I can see this warning (but -Wmaybe-uninitialized instead). >> > >> > I did suspect wireless-next tree does more compiler options, so I also >> > tried to merge the tree, but still the same. >> >> Weird, maybe it's due to different kconfig options? I have attached my >> .config which I use to compile test wireless trees. > > Using your .config can reproduce the symptom, and then I try to bisect CONFIG_xxx. > The cause is "CONFIG_DEBUG_SECTION_MISMATCH=y". My .config didn't have that. > > I also tried my original compiler that can also see the warning with > new .config. Ah, I would not have never guessed that option could cause something like this. Very good to know.