* Re: drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false [not found] ` <87pmeol020.fsf@kernel.org> @ 2022-10-19 7:59 ` Jason A. Donenfeld 2022-10-19 8:02 ` Jason A. Donenfeld 0 siblings, 1 reply; 4+ messages in thread From: Jason A. Donenfeld @ 2022-10-19 7:59 UTC (permalink / raw) To: Kalle Valo Cc: kernel test robot, Tomislav Požega, llvm, kbuild-all, linux-kernel, Daniel Golle, linux-wireless On Wed, Oct 19, 2022 at 1:55 AM Kalle Valo <kvalo@kernel.org> wrote: > > + jason, linux-wireless > > kernel test robot <lkp@intel.com> writes: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: aae703b02f92bde9264366c545e87cec451de471 > > commit: dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 wifi: rt2x00: add TX > > LOFT calibration for MT7620 > > date: 4 weeks ago > > config: arm64-allmodconfig > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project > > 791a7ae1ba3efd6bca96338e10ffde557ba83920) > > reproduce (this is a W=1 build): > > wget > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross > > -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # install arm64 cross compiling tool for clang build > > # apt-get install binutils-aarch64-linux-gnu > > # > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > git remote add linus > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > git fetch --no-tags linus master > > git checkout dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > # save the config file > > mkdir build_dir && cp config build_dir/.config > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 > > O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ > > drivers/net/wireless/ralink/rt2x00/ drivers/staging/media/ > > > > If you fix the issue, kindly add following tag where applicable > > | Reported-by: kernel test robot <lkp@intel.com> > > > > All warnings (new ones prefixed by >>): > > > >>> drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: > >> result of comparison of constant -7 with expression of type 'char' > >> is always false [-Wtautological-constant-out-of-range-compare] > > gerr = (gerr < -0x07) ? -0x07 : (gerr > 0x05) ? 0x05 : gerr; > > ~~~~ ^ ~~~~~ > > drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9443:15: warning: result of comparison of constant -31 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] > > perr = (perr < -0x1f) ? -0x1f : (perr > 0x1d) ? 0x1d : perr; > > ~~~~ ^ ~~~~~ > > 2 warnings generated. > > I believe this patch should fix it: > > https://patchwork.kernel.org/project/linux-wireless/patch/20221018202734.140489-1-Jason@zx2c4.com/ > > Jason, is my understanding correct? That's a different bug caused by the same pitfall: assuming char is signed. I'll send a patch for that function too. Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false 2022-10-19 7:59 ` drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false Jason A. Donenfeld @ 2022-10-19 8:02 ` Jason A. Donenfeld 2022-10-19 8:15 ` Jason A. Donenfeld 0 siblings, 1 reply; 4+ messages in thread From: Jason A. Donenfeld @ 2022-10-19 8:02 UTC (permalink / raw) To: Kalle Valo Cc: kernel test robot, Tomislav Požega, llvm, kbuild-all, linux-kernel, Daniel Golle, linux-wireless On Wed, Oct 19, 2022 at 1:59 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Oct 19, 2022 at 1:55 AM Kalle Valo <kvalo@kernel.org> wrote: > > > > + jason, linux-wireless > > > > kernel test robot <lkp@intel.com> writes: > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > > head: aae703b02f92bde9264366c545e87cec451de471 > > > commit: dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 wifi: rt2x00: add TX > > > LOFT calibration for MT7620 > > > date: 4 weeks ago > > > config: arm64-allmodconfig > > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project > > > 791a7ae1ba3efd6bca96338e10ffde557ba83920) > > > reproduce (this is a W=1 build): > > > wget > > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross > > > -O ~/bin/make.cross > > > chmod +x ~/bin/make.cross > > > # install arm64 cross compiling tool for clang build > > > # apt-get install binutils-aarch64-linux-gnu > > > # > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > > git remote add linus > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > > git fetch --no-tags linus master > > > git checkout dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > > # save the config file > > > mkdir build_dir && cp config build_dir/.config > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 > > > O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ > > > drivers/net/wireless/ralink/rt2x00/ drivers/staging/media/ > > > > > > If you fix the issue, kindly add following tag where applicable > > > | Reported-by: kernel test robot <lkp@intel.com> > > > > > > All warnings (new ones prefixed by >>): > > > > > >>> drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: > > >> result of comparison of constant -7 with expression of type 'char' > > >> is always false [-Wtautological-constant-out-of-range-compare] > > > gerr = (gerr < -0x07) ? -0x07 : (gerr > 0x05) ? 0x05 : gerr; > > > ~~~~ ^ ~~~~~ > > > drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9443:15: warning: result of comparison of constant -31 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] > > > perr = (perr < -0x1f) ? -0x1f : (perr > 0x1d) ? 0x1d : perr; > > > ~~~~ ^ ~~~~~ > > > 2 warnings generated. > > > > I believe this patch should fix it: > > > > https://patchwork.kernel.org/project/linux-wireless/patch/20221018202734.140489-1-Jason@zx2c4.com/ > > > > Jason, is my understanding correct? > > That's a different bug caused by the same pitfall: assuming char is > signed. I'll send a patch for that function too. Actually, maybe I should fix the whole file? Patch incoming. Jason ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false 2022-10-19 8:02 ` Jason A. Donenfeld @ 2022-10-19 8:15 ` Jason A. Donenfeld 2022-10-20 5:26 ` Kalle Valo 0 siblings, 1 reply; 4+ messages in thread From: Jason A. Donenfeld @ 2022-10-19 8:15 UTC (permalink / raw) To: Kalle Valo Cc: kernel test robot, Tomislav Požega, llvm, kbuild-all, linux-kernel, Daniel Golle, linux-wireless On Wed, Oct 19, 2022 at 2:02 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > On Wed, Oct 19, 2022 at 1:59 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: > > > > On Wed, Oct 19, 2022 at 1:55 AM Kalle Valo <kvalo@kernel.org> wrote: > > > > > > + jason, linux-wireless > > > > > > kernel test robot <lkp@intel.com> writes: > > > > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > > > head: aae703b02f92bde9264366c545e87cec451de471 > > > > commit: dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 wifi: rt2x00: add TX > > > > LOFT calibration for MT7620 > > > > date: 4 weeks ago > > > > config: arm64-allmodconfig > > > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project > > > > 791a7ae1ba3efd6bca96338e10ffde557ba83920) > > > > reproduce (this is a W=1 build): > > > > wget > > > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross > > > > -O ~/bin/make.cross > > > > chmod +x ~/bin/make.cross > > > > # install arm64 cross compiling tool for clang build > > > > # apt-get install binutils-aarch64-linux-gnu > > > > # > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > > > git remote add linus > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > > > git fetch --no-tags linus master > > > > git checkout dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 > > > > # save the config file > > > > mkdir build_dir && cp config build_dir/.config > > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 > > > > O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ > > > > drivers/net/wireless/ralink/rt2x00/ drivers/staging/media/ > > > > > > > > If you fix the issue, kindly add following tag where applicable > > > > | Reported-by: kernel test robot <lkp@intel.com> > > > > > > > > All warnings (new ones prefixed by >>): > > > > > > > >>> drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: > > > >> result of comparison of constant -7 with expression of type 'char' > > > >> is always false [-Wtautological-constant-out-of-range-compare] > > > > gerr = (gerr < -0x07) ? -0x07 : (gerr > 0x05) ? 0x05 : gerr; > > > > ~~~~ ^ ~~~~~ > > > > drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9443:15: warning: result of comparison of constant -31 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] > > > > perr = (perr < -0x1f) ? -0x1f : (perr > 0x1d) ? 0x1d : perr; > > > > ~~~~ ^ ~~~~~ > > > > 2 warnings generated. > > > > > > I believe this patch should fix it: > > > > > > https://patchwork.kernel.org/project/linux-wireless/patch/20221018202734.140489-1-Jason@zx2c4.com/ > > > > > > Jason, is my understanding correct? > > > > That's a different bug caused by the same pitfall: assuming char is > > signed. I'll send a patch for that function too. > > > Actually, maybe I should fix the whole file? Patch incoming. Okay here's a v2 that handles it driver-wide: https://lore.kernel.org/linux-wireless/20221019081417.3402284-1-Jason@zx2c4.com/ (Might take a few minutes to hit lore.) ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false 2022-10-19 8:15 ` Jason A. Donenfeld @ 2022-10-20 5:26 ` Kalle Valo 0 siblings, 0 replies; 4+ messages in thread From: Kalle Valo @ 2022-10-20 5:26 UTC (permalink / raw) To: Jason A. Donenfeld Cc: kernel test robot, Tomislav Požega, llvm, kbuild-all, linux-kernel, Daniel Golle, linux-wireless "Jason A. Donenfeld" <Jason@zx2c4.com> writes: > On Wed, Oct 19, 2022 at 2:02 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: >> >> On Wed, Oct 19, 2022 at 1:59 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote: >> > >> > On Wed, Oct 19, 2022 at 1:55 AM Kalle Valo <kvalo@kernel.org> wrote: >> > > >> > > + jason, linux-wireless >> > > >> > > kernel test robot <lkp@intel.com> writes: >> > > >> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master >> > > > head: aae703b02f92bde9264366c545e87cec451de471 >> > > > commit: dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 wifi: rt2x00: add TX >> > > > LOFT calibration for MT7620 >> > > > date: 4 weeks ago >> > > > config: arm64-allmodconfig >> > > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project >> > > > 791a7ae1ba3efd6bca96338e10ffde557ba83920) >> > > > reproduce (this is a W=1 build): >> > > > wget >> > > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross >> > > > -O ~/bin/make.cross >> > > > chmod +x ~/bin/make.cross >> > > > # install arm64 cross compiling tool for clang build >> > > > # apt-get install binutils-aarch64-linux-gnu >> > > > # >> > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 >> > > > git remote add linus >> > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> > > > git fetch --no-tags linus master >> > > > git checkout dab902fe1d29dc0fa1dccc8d13dc89ffbf633881 >> > > > # save the config file >> > > > mkdir build_dir && cp config build_dir/.config >> > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 >> > > > O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ >> > > > drivers/net/wireless/ralink/rt2x00/ drivers/staging/media/ >> > > > >> > > > If you fix the issue, kindly add following tag where applicable >> > > > | Reported-by: kernel test robot <lkp@intel.com> >> > > > >> > > > All warnings (new ones prefixed by >>): >> > > > >> > > >>> drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: >> > > >> result of comparison of constant -7 with expression of type 'char' >> > > >> is always false [-Wtautological-constant-out-of-range-compare] >> > > > gerr = (gerr < -0x07) ? -0x07 : (gerr > 0x05) ? 0x05 : gerr; >> > > > ~~~~ ^ ~~~~~ >> > > > drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9443:15: warning: result of comparison of constant -31 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] >> > > > perr = (perr < -0x1f) ? -0x1f : (perr > 0x1d) ? 0x1d : perr; >> > > > ~~~~ ^ ~~~~~ >> > > > 2 warnings generated. >> > > >> > > I believe this patch should fix it: >> > > >> > > https://patchwork.kernel.org/project/linux-wireless/patch/20221018202734.140489-1-Jason@zx2c4.com/ >> > > >> > > Jason, is my understanding correct? >> > >> > That's a different bug caused by the same pitfall: assuming char is >> > signed. I'll send a patch for that function too. >> >> >> Actually, maybe I should fix the whole file? Patch incoming. > > Okay here's a v2 that handles it driver-wide: > https://lore.kernel.org/linux-wireless/20221019081417.3402284-1-Jason@zx2c4.com/ > (Might take a few minutes to hit lore.) Great, thanks Jason. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-20 5:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202210191553.vO9rtKe5-lkp@intel.com>
[not found] ` <87pmeol020.fsf@kernel.org>
2022-10-19 7:59 ` drivers/net/wireless/ralink/rt2x00/rt2800lib.c:9439:15: warning: result of comparison of constant -7 with expression of type 'char' is always false Jason A. Donenfeld
2022-10-19 8:02 ` Jason A. Donenfeld
2022-10-19 8:15 ` Jason A. Donenfeld
2022-10-20 5:26 ` Kalle Valo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).