Hi Karol,

kernel test robot noticed the following build warnings:

[auto build test WARNING on c6f2492cda380a8bce00f61c3a4272401fbb9043]

url:    
https://github.com/intel-lab-lkp/linux/commits/Karol-Kolacinski/ice-Introduce-ice_ptp_hw-struct/20240408-192129
base:   c6f2492cda380a8bce00f61c3a4272401fbb9043
patch link:    
https://lore.kernel.org/r/20240408111814.404583-19-karol.kolacinski%40intel.com
patch subject: [PATCH v7 iwl-next 05/12] ice: Move CGU block
config: arm-randconfig-002-20240412 
(https://download.01.org/0day-ci/archive/20240412/[email protected]/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git 
ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240412/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to 
see all)
   include/linux/compiler_types.h:460:22: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:448:23: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:440:9: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   include/linux/bitfield.h:156:30: note: expanded from macro 'FIELD_GET'
                   (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
                                              ^~~~~
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:902:19: warning: shift count is 
>> negative [-Wshift-count-negative]
           high = FIELD_GET(P_REG_40B_HIGH_M, val);
                  ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:381:27: note: expanded from 
macro 'P_REG_40B_HIGH_M'
   #define P_REG_40B_HIGH_M                GENMASK(39, 8)
                                           ^
   include/linux/bits.h:35:31: note: expanded from macro 'GENMASK'
           (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
                                        ^
   include/uapi/linux/bits.h:9:19: note: expanded from macro '__GENMASK'
            (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
                     ^
   include/linux/bitfield.h:156:50: note: expanded from macro 'FIELD_GET'
                   (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
                                                         ~~~~~~~~~^~~~~~
   include/linux/bitfield.h:45:38: note: expanded from macro '__bf_shf'
   #define __bf_shf(x) (__builtin_ffsll(x) - 1)
                                        ^
   11 warnings generated.


vim +902 drivers/net/ethernet/intel/ice/ice_ptp_hw.c

   875  
   876  /**
   877   * ice_write_40b_phy_reg_e82x - Write a 40b value to the PHY
   878   * @hw: pointer to the HW struct
   879   * @port: port to write to
   880   * @low_addr: offset of the low register
   881   * @val: 40b value to write
   882   *
   883   * Write the provided 40b value to the two associated registers by 
splitting
   884   * it up into two chunks, the lower 8 bits and the upper 32 bits.
   885   */
   886  static int
   887  ice_write_40b_phy_reg_e82x(struct ice_hw *hw, u8 port, u16 low_addr, 
u64 val)
   888  {
   889          u32 low, high;
   890          u16 high_addr;
   891          int err;
   892  
   893          /* Only operate on registers known to be split into a lower 8 
bit
   894           * register and an upper 32 bit register.
   895           */
   896          if (!ice_is_40b_phy_reg_e82x(low_addr, &high_addr)) {
   897                  ice_debug(hw, ICE_DBG_PTP, "Invalid 40b register addr 
0x%08x\n",
   898                            low_addr);
   899                  return -EINVAL;
   900          }
   901          low = FIELD_GET(P_REG_40B_LOW_M, val);
 > 902          high = FIELD_GET(P_REG_40B_HIGH_M, val);
   903  
   904          err = ice_write_phy_reg_e82x(hw, port, low_addr, low);
   905          if (err) {
   906                  ice_debug(hw, ICE_DBG_PTP, "Failed to write to low 
register 0x%08x\n, err %d",
   907                            low_addr, err);
   908                  return err;
   909          }
   910  
   911          err = ice_write_phy_reg_e82x(hw, port, high_addr, high);
   912          if (err) {
   913                  ice_debug(hw, ICE_DBG_PTP, "Failed to write to high 
register 0x%08x\n, err %d",
   914                            high_addr, err);
   915                  return err;
   916          }
   917  
   918          return 0;
   919  }
   920  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to