tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   69119673bd50b176ded34032fadd41530fb5af21
commit: bd607166af7fe31f8d8e9c575f4561a4b56b9f24 drm/amdgpu: Enable reading FRU 
chip via I2C v3
date:   3 months ago
config: ia64-randconfig-r012-20200617 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
        git checkout bd607166af7fe31f8d8e9c575f4561a4b56b9f24
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:32:5: warning: no previous 
>> prototype for 'amdgpu_fru_read_eeprom' [-Wmissing-prototypes]
32 | int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
|     ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:69:5: warning: no previous 
>> prototype for 'amdgpu_fru_get_product_info' [-Wmissing-prototypes]
69 | int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
|     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:177:18: warning: 'sched_policy' defined but 
not used [-Wunused-const-variable=]
177 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
|                  ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:53,
from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 
'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
|                                ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 
'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
|                                ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 
'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
|                                ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 
'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
|                                ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 
'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
|                                ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 
'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
|                                ^~~~~~~~~~~~~

vim +/amdgpu_fru_read_eeprom +32 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c

    31  
  > 32  int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
    33                             unsigned char *buff)
    34  {
    35          int ret, size;
    36          struct i2c_msg msg = {
    37                          .addr   = I2C_PRODUCT_INFO_ADDR,
    38                          .flags  = I2C_M_RD,
    39                          .buf    = buff,
    40          };
    41          buff[0] = 0;
    42          buff[1] = addrptr;
    43          msg.len = I2C_PRODUCT_INFO_ADDR_SIZE + 1;
    44          ret = i2c_transfer(&adev->pm.smu_i2c, &msg, 1);
    45  
    46          if (ret < 1) {
    47                  DRM_WARN("FRU: Failed to get size field");
    48                  return ret;
    49          }
    50  
    51          /* The size returned by the i2c requires subtraction of 0xC0 
since the
    52           * size apparently always reports as 0xC0+actual size.
    53           */
    54          size = buff[2] - I2C_PRODUCT_INFO_OFFSET;
    55          /* Add 1 since address field was 1 byte */
    56          buff[1] = addrptr + 1;
    57  
    58          msg.len = I2C_PRODUCT_INFO_ADDR_SIZE + size;
    59          ret = i2c_transfer(&adev->pm.smu_i2c, &msg, 1);
    60  
    61          if (ret < 1) {
    62                  DRM_WARN("FRU: Failed to get data field");
    63                  return ret;
    64          }
    65  
    66          return size;
    67  }
    68  
  > 69  int amdgpu_fru_get_product_info(struct amdgpu_device *adev)

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to