Hi Karol,

kernel test robot noticed the following build errors:

[auto build test ERROR on 0a3074e5b4b523fb60f4ae9fb32bb180ea1fb6ef]

url:    
https://github.com/intel-lab-lkp/linux/commits/Karol-Kolacinski/ice-Introduce-ice_ptp_hw-struct/20240405-180941
base:   0a3074e5b4b523fb60f4ae9fb32bb180ea1fb6ef
patch link:    
https://lore.kernel.org/r/20240405100648.144756-21-karol.kolacinski%40intel.com
patch subject: [Intel-wired-lan] [PATCH v6 iwl-next 07/12] ice: Introduce 
ETH56G PHY model for E825C products
config: i386-allmodconfig 
(https://download.01.org/0day-ci/archive/20240405/[email protected]/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240405/[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 errors (new ones prefixed by >>):

   drivers/net/ethernet/intel/ice/ice_ptp_hw.c: In function 
'ice_read_cgu_reg_e82x':
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:245:25: warning: initialization 
of 'unsigned int' from 'u32 *' {aka 'unsigned int *'} makes integer from 
pointer without a cast [-Wint-conversion]
     245 |                 .data = val
         |                         ^~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:245:25: note: (near 
initialization for 'cgu_msg.data')
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c: In function 
'ice_write_40b_phy_reg_eth56g':
>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:1035:27: error: 
>> 'P_REG_40B_HIGH_S' undeclared (first use in this function); did you mean 
>> 'P_REG_40B_HIGH_M'?
    1035 |         hi = (u32)(val >> P_REG_40B_HIGH_S);
         |                           ^~~~~~~~~~~~~~~~
         |                           P_REG_40B_HIGH_M
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:1035:27: note: each undeclared 
identifier is reported only once for each function it appears in
   In file included from <command-line>:
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c: In function 
'ice_write_40b_phy_reg_e82x':
   include/uapi/linux/bits.h:9:19: warning: right shift count is negative 
[-Wshift-count-negative]
       9 |          (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
         |                   ^~
   include/linux/compiler_types.h:440:23: note: in definition of macro 
'__compiletime_assert'
     440 |                 if (!(condition))                                    
   \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:460:9: note: in expansion of macro 
'_compiletime_assert'
     460 |         _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 
'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:65:17: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
      65 |                 BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask),       
   \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:155:17: note: in expansion of macro 
'__BF_FIELD_CHECK'
     155 |                 __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: ");    
   \
         |                 ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:16: note: in expansion of 
macro 'FIELD_GET'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                ^~~~~~~~~
   include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
      35 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:521:41: note: in expansion of 
macro 'GENMASK'
     521 | #define P_REG_40B_HIGH_M                GENMASK(39, 8)
         |                                         ^~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:26: note: in expansion of 
macro 'P_REG_40B_HIGH_M'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                          ^~~~~~~~~~~~~~~~
   include/uapi/linux/bits.h:9:19: warning: right shift count is negative 
[-Wshift-count-negative]
       9 |          (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
         |                   ^~
   include/linux/compiler_types.h:440:23: note: in definition of macro 
'__compiletime_assert'
     440 |                 if (!(condition))                                    
   \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:460:9: note: in expansion of macro 
'_compiletime_assert'
     460 |         _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 
'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:67:17: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
      67 |                 BUILD_BUG_ON_MSG((_mask) == 0, _pfx "mask is zero"); 
   \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:155:17: note: in expansion of macro 
'__BF_FIELD_CHECK'
     155 |                 __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: ");    
   \
         |                 ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:16: note: in expansion of 
macro 'FIELD_GET'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                ^~~~~~~~~
   include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
      35 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:521:41: note: in expansion of 
macro 'GENMASK'
     521 | #define P_REG_40B_HIGH_M                GENMASK(39, 8)
         |                                         ^~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:26: note: in expansion of 
macro 'P_REG_40B_HIGH_M'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                          ^~~~~~~~~~~~~~~~
   include/uapi/linux/bits.h:9:19: warning: right shift count is negative 
[-Wshift-count-negative]
       9 |          (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
         |                   ^~
   include/linux/compiler_types.h:440:23: note: in definition of macro 
'__compiletime_assert'
     440 |                 if (!(condition))                                    
   \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:460:9: note: in expansion of macro 
'_compiletime_assert'
     460 |         _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 
'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:68:17: note: in expansion of macro 
'BUILD_BUG_ON_MSG'
      68 |                 BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?        
   \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:155:17: note: in expansion of macro 
'__BF_FIELD_CHECK'
     155 |                 __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: ");    
   \
         |                 ^~~~~~~~~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:16: note: in expansion of 
macro 'FIELD_GET'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                ^~~~~~~~~
   include/linux/bits.h:35:38: note: in expansion of macro '__GENMASK'
      35 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.h:521:41: note: in expansion of 
macro 'GENMASK'
     521 | #define P_REG_40B_HIGH_M                GENMASK(39, 8)
         |                                         ^~~~~~~
   drivers/net/ethernet/intel/ice/ice_ptp_hw.c:2529:26: note: in expansion of 
macro 'P_REG_40B_HIGH_M'
    2529 |         high = FIELD_GET(P_REG_40B_HIGH_M, val);
         |                          ^~~~~~~~~~~~~~~~
   include/uapi/linux/bits.h:9:19: warning: right shift count is negative 
[-Wshift-count-negative]
       9 |          (~_UL(0) >> (__BITS_PER_LONG - 1 - (h))))
         |                   ^~
   include/linux/compiler_types.h:440:23: note: in definition of macro 
'__compiletime_assert'


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

  1010  
  1011  /**
  1012   * ice_write_40b_phy_reg_eth56g - Write a 40b value to the PHY
  1013   * @hw: pointer to the HW struct
  1014   * @port: port to write to
  1015   * @low_addr: offset of the low register
  1016   * @val: 40b value to write
  1017   * @res_type: resource type
  1018   *
  1019   * Check if the caller has specified a known 40 bit register offset and 
write
  1020   * provided 40b value to the two associated registers by splitting it 
up into
  1021   * two chunks, the lower 8 bits and the upper 32 bits.
  1022   */
  1023  static int ice_write_40b_phy_reg_eth56g(struct ice_hw *hw, u8 port,
  1024                                          u16 low_addr, u64 val,
  1025                                          enum eth56g_res_type res_type)
  1026  {
  1027          u16 high_addr;
  1028          u32 lo, hi;
  1029          int err;
  1030  
  1031          if (!ice_is_40b_phy_reg_eth56g(low_addr, &high_addr))
  1032                  return -EINVAL;
  1033  
  1034          lo = (u32)(val & P_REG_40B_LOW_M);
> 1035          hi = (u32)(val >> P_REG_40B_HIGH_S);
  1036  
  1037          err = ice_write_port_eth56g(hw, port, low_addr, lo, res_type);
  1038          if (err) {
  1039                  ice_debug(hw, ICE_DBG_PTP, "Failed to write to low 
register 0x%08x\n, err %d",
  1040                            low_addr, err);
  1041                  return err;
  1042          }
  1043  
  1044          err = ice_write_port_eth56g(hw, port, high_addr, hi, res_type);
  1045          if (err) {
  1046                  ice_debug(hw, ICE_DBG_PTP, "Failed to write to high 
register 0x%08x\n, err %d",
  1047                            high_addr, err);
  1048                  return err;
  1049          }
  1050  
  1051          return 0;
  1052  }
  1053  

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

Reply via email to