• Ping-Ke Shih's avatar
    rtw89: 8852c: fix warning of FIELD_PREP() mask type · 68bf56e3
    Ping-Ke Shih authored
    To fix the compiler warning of clang with i386 config, but not complain
    by gcc:
    
               __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))                                       \
                             ^~~~~~~~~
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
    Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
    Link: https://lore.kernel.org/r/20220503120001.79272-8-pkshih@realtek.com
    68bf56e3
rtw8852c.c 94.5 KB