public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
       [not found] <20220426063235.41650-16-pkshih@realtek.com>
@ 2022-04-29  0:45 ` kernel test robot
  2022-04-29  5:30   ` Pkshih
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-04-29  0:45 UTC (permalink / raw)
  To: Ping-Ke Shih, kvalo; +Cc: llvm, kbuild-all, linux-wireless

Hi Ping-Ke,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on next-20220428]
[cannot apply to wireless/main v5.18-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce-in-Makefile-and-Kconfig/20220426-143456
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220429/202204290830.slUaIhad-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
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
        # https://github.com/intel-lab-lkp/linux/commit/5aaabdd4d9ac433ed14c1c02147c2609827739d2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce-in-Makefile-and-Kconfig/20220426-143456
        git checkout 5aaabdd4d9ac433ed14c1c02147c2609827739d2
        # 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=i386 SHELL=/bin/bash drivers/net/wireless/realtek/rtw89/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/realtek/rtw89/rtw8852c.c:2640:2: warning: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((__msk), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (__msk)))' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
           __write_ctrl(R_AX_PWR_RATE_CTRL, B_AX_FORCE_PWR_BY_RATE_VALUE_MASK,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/realtek/rtw89/rtw8852c.c:2621:13: note: expanded from macro '__write_ctrl'
           u32 _wrt = FIELD_PREP(__msk, _val);                     \
                      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
                   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK'
                   BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:352:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:340:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:332:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   drivers/net/wireless/realtek/rtw89/rtw8852c.c:2653:2: warning: result of comparison of constant 18446744073709551615 with expression of type 'typeof (_Generic((__msk), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (__msk)))' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
           __write_ctrl(R_AX_PWR_COEXT_CTRL, B_AX_TXAGC_BT_MASK, val,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/wireless/realtek/rtw89/rtw8852c.c:2621:13: note: expanded from macro '__write_ctrl'
           u32 _wrt = FIELD_PREP(__msk, _val);                     \
                      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
                   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK'
                   BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:352:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:340:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:332:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   2 warnings generated.


vim +2640 drivers/net/wireless/realtek/rtw89/rtw8852c.c

2fb822f82a59db Ping-Ke Shih 2022-04-21  2630  
2fb822f82a59db Ping-Ke Shih 2022-04-21  2631  	switch (arg.ctrl_all_time) {
2fb822f82a59db Ping-Ke Shih 2022-04-21  2632  	case 0xffff:
2fb822f82a59db Ping-Ke Shih 2022-04-21  2633  		val = 0;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2634  		break;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2635  	default:
2fb822f82a59db Ping-Ke Shih 2022-04-21  2636  		val = arg.all_time.data;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2637  		break;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2638  	}
2fb822f82a59db Ping-Ke Shih 2022-04-21  2639  
2fb822f82a59db Ping-Ke Shih 2022-04-21 @2640  	__write_ctrl(R_AX_PWR_RATE_CTRL, B_AX_FORCE_PWR_BY_RATE_VALUE_MASK,
2fb822f82a59db Ping-Ke Shih 2022-04-21  2641  		     val, B_AX_FORCE_PWR_BY_RATE_EN,
2fb822f82a59db Ping-Ke Shih 2022-04-21  2642  		     arg.ctrl_all_time != 0xffff);
2fb822f82a59db Ping-Ke Shih 2022-04-21  2643  
2fb822f82a59db Ping-Ke Shih 2022-04-21  2644  	switch (arg.ctrl_gnt_bt) {
2fb822f82a59db Ping-Ke Shih 2022-04-21  2645  	case 0xffff:
2fb822f82a59db Ping-Ke Shih 2022-04-21  2646  		val = 0;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2647  		break;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2648  	default:
2fb822f82a59db Ping-Ke Shih 2022-04-21  2649  		val = arg.gnt_bt.data;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2650  		break;
2fb822f82a59db Ping-Ke Shih 2022-04-21  2651  	};
2fb822f82a59db Ping-Ke Shih 2022-04-21  2652  
2fb822f82a59db Ping-Ke Shih 2022-04-21  2653  	__write_ctrl(R_AX_PWR_COEXT_CTRL, B_AX_TXAGC_BT_MASK, val,
2fb822f82a59db Ping-Ke Shih 2022-04-21  2654  		     B_AX_TXAGC_BT_EN, arg.ctrl_gnt_bt != 0xffff);
2fb822f82a59db Ping-Ke Shih 2022-04-21  2655  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
  2022-04-29  0:45 ` [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig kernel test robot
@ 2022-04-29  5:30   ` Pkshih
  2022-04-29  5:52     ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Pkshih @ 2022-04-29  5:30 UTC (permalink / raw)
  To: kernel test robot, kvalo@kernel.org
  Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-wireless@vger.kernel.org


> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: Friday, April 29, 2022 8:46 AM
> To: Pkshih <pkshih@realtek.com>; kvalo@kernel.org
> Cc: llvm@lists.linux.dev; kbuild-all@lists.01.org; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
> 
> Hi Ping-Ke,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on wireless-next/main]
> [also build test WARNING on next-20220428]
> [cannot apply to wireless/main v5.18-rc4]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:
> https://github.com/intel-lab-lkp/linux/commits/Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce
> -in-Makefile-and-Kconfig/20220426-143456
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
> config: i386-allmodconfig
> (https://download.01.org/0day-ci/archive/20220429/202204290830.slUaIhad-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project
> c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
> 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
>         # https://github.com/intel-lab-lkp/linux/commit/5aaabdd4d9ac433ed14c1c02147c2609827739d2
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review
> Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce-in-Makefile-and-Kconfig/20220426-143456
>         git checkout 5aaabdd4d9ac433ed14c1c02147c2609827739d2
>         # 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=i386
> SHELL=/bin/bash drivers/net/wireless/realtek/rtw89/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/wireless/realtek/rtw89/rtw8852c.c:2640:2: warning: result of comparison of constant
> 18446744073709551615 with expression of type 'typeof (_Generic((__msk), char: (unsigned char)0, unsigned
> char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned
> short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long:
> (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default:
> (__msk)))' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
>            __write_ctrl(R_AX_PWR_RATE_CTRL, B_AX_FORCE_PWR_BY_RATE_VALUE_MASK,
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/net/wireless/realtek/rtw89/rtw8852c.c:2621:13: note: expanded from macro '__write_ctrl'
>            u32 _wrt = FIELD_PREP(__msk, _val);                     \
>                       ^~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
>                    __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK'
>                    BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \
>                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
>    note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
>    include/linux/compiler_types.h:352:22: note: expanded from macro 'compiletime_assert'
>            _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/compiler_types.h:340:23: note: expanded from macro '_compiletime_assert'
>            __compiletime_assert(condition, msg, prefix, suffix)
>            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/compiler_types.h:332:9: note: expanded from macro '__compiletime_assert'
>                    if (!(condition))                                       \
>                          ^~~~~~~~~

We add 'BUILD_BUG_ON((__msk & __en) != 0);' to prevent coding error during
development. The __msk and __en in the expression are constant and expected
no intersection of these two bit masks. Since we have verified this code,
I think I can send a patch to remove the BUILD_BUG_ON() from this macro.

Thank you
Ping-Ke


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
  2022-04-29  5:30   ` Pkshih
@ 2022-04-29  5:52     ` Kalle Valo
  2022-04-29  7:25       ` Pkshih
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2022-04-29  5:52 UTC (permalink / raw)
  To: Pkshih
  Cc: kernel test robot, llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-wireless@vger.kernel.org

Pkshih <pkshih@realtek.com> writes:

>> -----Original Message-----
>> From: kernel test robot <lkp@intel.com>
>> Sent: Friday, April 29, 2022 8:46 AM
>> To: Pkshih <pkshih@realtek.com>; kvalo@kernel.org
>> Cc: llvm@lists.linux.dev; kbuild-all@lists.01.org; linux-wireless@vger.kernel.org
>> Subject: Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
>> 
>> Hi Ping-Ke,
>> 
>> I love your patch! Perhaps something to improve:
>> 
>> [auto build test WARNING on wireless-next/main]
>> [also build test WARNING on next-20220428]
>> [cannot apply to wireless/main v5.18-rc4]
>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>> And when submitting patch, we suggest to use '--base' as documented in
>> https://git-scm.com/docs/git-format-patch]
>> 
>> url:
>> https://github.com/intel-lab-lkp/linux/commits/Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce
>> -in-Makefile-and-Kconfig/20220426-143456
>> base:
>> https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
>> main
>> config: i386-allmodconfig
>> (https://download.01.org/0day-ci/archive/20220429/202204290830.slUaIhad-lkp@intel.com/config)
>> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project
>> c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
>> 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
>>         #
>> https://github.com/intel-lab-lkp/linux/commit/5aaabdd4d9ac433ed14c1c02147c2609827739d2
>>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>>         git fetch --no-tags linux-review
>> Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce-in-Makefile-and-Kconfig/20220426-143456
>>         git checkout 5aaabdd4d9ac433ed14c1c02147c2609827739d2
>>         # 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=i386
>> SHELL=/bin/bash drivers/net/wireless/realtek/rtw89/
>> 
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>> 
>> All warnings (new ones prefixed by >>):
>> 
>> >> drivers/net/wireless/realtek/rtw89/rtw8852c.c:2640:2: warning:
>> > result of comparison of constant
>> 18446744073709551615 with expression of type 'typeof (_Generic((__msk), char: (unsigned char)0, unsigned
>> char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned
>> short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long:
>> (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default:
>> (__msk)))' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
>>            __write_ctrl(R_AX_PWR_RATE_CTRL, B_AX_FORCE_PWR_BY_RATE_VALUE_MASK,
>>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    drivers/net/wireless/realtek/rtw89/rtw8852c.c:2621:13: note: expanded from macro '__write_ctrl'
>>            u32 _wrt = FIELD_PREP(__msk, _val);                     \
>>                       ^~~~~~~~~~~~~~~~~~~~~~~
>>    include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
>>                    __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
>>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK'
>>                    BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \
>>                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
>>    note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
>>    include/linux/compiler_types.h:352:22: note: expanded from macro 'compiletime_assert'
>>            _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>>            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    include/linux/compiler_types.h:340:23: note: expanded from macro '_compiletime_assert'
>>            __compiletime_assert(condition, msg, prefix, suffix)
>>            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    include/linux/compiler_types.h:332:9: note: expanded from macro '__compiletime_assert'
>>                    if (!(condition))                                       \
>>                          ^~~~~~~~~
>
> We add 'BUILD_BUG_ON((__msk & __en) != 0);' to prevent coding error during
> development. The __msk and __en in the expression are constant and expected
> no intersection of these two bit masks. Since we have verified this code,
> I think I can send a patch to remove the BUILD_BUG_ON() from this macro.

I'm dropping the patchset, please submit a new version including your
fix.

-- 
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

* RE: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
  2022-04-29  5:52     ` Kalle Valo
@ 2022-04-29  7:25       ` Pkshih
  0 siblings, 0 replies; 4+ messages in thread
From: Pkshih @ 2022-04-29  7:25 UTC (permalink / raw)
  To: Kalle Valo
  Cc: kernel test robot, llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-wireless@vger.kernel.org


> -----Original Message-----
> From: Kalle Valo <kvalo@kernel.org>
> Sent: Friday, April 29, 2022 1:53 PM
> To: Pkshih <pkshih@realtek.com>
> Cc: kernel test robot <lkp@intel.com>; llvm@lists.linux.dev; kbuild-all@lists.01.org;
> linux-wireless@vger.kernel.org
> Subject: Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
> 
> Pkshih <pkshih@realtek.com> writes:
> 
> >> -----Original Message-----
> >> From: kernel test robot <lkp@intel.com>
> >> Sent: Friday, April 29, 2022 8:46 AM
> >> To: Pkshih <pkshih@realtek.com>; kvalo@kernel.org
> >> Cc: llvm@lists.linux.dev; kbuild-all@lists.01.org; linux-wireless@vger.kernel.org
> >> Subject: Re: [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig
> >>
> >> Hi Ping-Ke,
> >>
> >> I love your patch! Perhaps something to improve:
> >>
> >> [auto build test WARNING on wireless-next/main]
> >> [also build test WARNING on next-20220428]
> >> [cannot apply to wireless/main v5.18-rc4]
> >> [If your patch is applied to the wrong git tree, kindly drop us a note.
> >> And when submitting patch, we suggest to use '--base' as documented in
> >> https://git-scm.com/docs/git-format-patch]
> >>
> >> url:
> >>
> https://github.com/intel-lab-lkp/linux/commits/Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce
> >> -in-Makefile-and-Kconfig/20220426-143456
> >> base:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git
> >> main
> >> config: i386-allmodconfig
> >> (https://download.01.org/0day-ci/archive/20220429/202204290830.slUaIhad-lkp@intel.com/config)
> >> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project
> >> c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
> >> 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
> >>         #
> >> https://github.com/intel-lab-lkp/linux/commit/5aaabdd4d9ac433ed14c1c02147c2609827739d2
> >>         git remote add linux-review https://github.com/intel-lab-lkp/linux
> >>         git fetch --no-tags linux-review
> >> Ping-Ke-Shih/rtw89-8852c-add-RFK-and-then-enable-8852ce-in-Makefile-and-Kconfig/20220426-143456
> >>         git checkout 5aaabdd4d9ac433ed14c1c02147c2609827739d2
> >>         # 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=i386
> >> SHELL=/bin/bash drivers/net/wireless/realtek/rtw89/
> >>
> >> If you fix the issue, kindly add following tag as appropriate
> >> Reported-by: kernel test robot <lkp@intel.com>
> >>
> >> All warnings (new ones prefixed by >>):
> >>
> >> >> drivers/net/wireless/realtek/rtw89/rtw8852c.c:2640:2: warning:
> >> > result of comparison of constant
> >> 18446744073709551615 with expression of type 'typeof (_Generic((__msk), char: (unsigned char)0, unsigned
> >> char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short:
> (unsigned
> >> short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long:
> >> (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default:
> >> (__msk)))' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
> >>            __write_ctrl(R_AX_PWR_RATE_CTRL, B_AX_FORCE_PWR_BY_RATE_VALUE_MASK,
> >>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>    drivers/net/wireless/realtek/rtw89/rtw8852c.c:2621:13: note: expanded from macro '__write_ctrl'
> >>            u32 _wrt = FIELD_PREP(__msk, _val);                     \
> >>                       ^~~~~~~~~~~~~~~~~~~~~~~
> >>    include/linux/bitfield.h:114:3: note: expanded from macro 'FIELD_PREP'
> >>                    __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
> >>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>    include/linux/bitfield.h:71:53: note: expanded from macro '__BF_FIELD_CHECK'
> >>                    BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \
> >>                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> >>    note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
> >>    include/linux/compiler_types.h:352:22: note: expanded from macro 'compiletime_assert'
> >>            _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> >>            ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>    include/linux/compiler_types.h:340:23: note: expanded from macro '_compiletime_assert'
> >>            __compiletime_assert(condition, msg, prefix, suffix)
> >>            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>    include/linux/compiler_types.h:332:9: note: expanded from macro '__compiletime_assert'
> >>                    if (!(condition))                                       \
> >>                          ^~~~~~~~~
> >
> > We add 'BUILD_BUG_ON((__msk & __en) != 0);' to prevent coding error during
> > development. The __msk and __en in the expression are constant and expected
> > no intersection of these two bit masks. Since we have verified this code,
> > I think I can send a patch to remove the BUILD_BUG_ON() from this macro.
> 
> I'm dropping the patchset, please submit a new version including your
> fix.
> 

v2 has sent. But, I misread the cause that isn't due to BUILD_BUG_ON() but mask type.

Ping-Ke



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-29  7:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220426063235.41650-16-pkshih@realtek.com>
2022-04-29  0:45 ` [PATCH 15/15] rtw89: 8852c: add 8852ce to Makefile and Kconfig kernel test robot
2022-04-29  5:30   ` Pkshih
2022-04-29  5:52     ` Kalle Valo
2022-04-29  7:25       ` Pkshih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox