tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git master head: 0b2f40fe4961467879063f9e70c4d1426ff4218d commit: e61bcf42d290e73025bab38e0e55a5586c2d8ad5 [1238/1305] i2c: Remove I2C_CLASS_SPD config: i386-randconfig-006-20240529 (https://download.01.org/0day-ci/archive/20240529/202405290948.dvQMPrCs-lkp@xxxxxxxxx/config) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240529/202405290948.dvQMPrCs-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202405290948.dvQMPrCs-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu14/smu_v14_0_2_ppt.c:1565:20: error: use of undeclared identifier 'I2C_CLASS_SPD' 1565 | control->class = I2C_CLASS_SPD; | ^ 1 error generated. vim +/I2C_CLASS_SPD +1565 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu14/smu_v14_0_2_ppt.c 3e55845c3983d92 Likun Gao 2023-04-25 1551 3e55845c3983d92 Likun Gao 2023-04-25 1552 static int smu_v14_0_2_i2c_control_init(struct smu_context *smu) 3e55845c3983d92 Likun Gao 2023-04-25 1553 { 3e55845c3983d92 Likun Gao 2023-04-25 1554 struct amdgpu_device *adev = smu->adev; 3e55845c3983d92 Likun Gao 2023-04-25 1555 int res, i; 3e55845c3983d92 Likun Gao 2023-04-25 1556 3e55845c3983d92 Likun Gao 2023-04-25 1557 for (i = 0; i < MAX_SMU_I2C_BUSES; i++) { 3e55845c3983d92 Likun Gao 2023-04-25 1558 struct amdgpu_smu_i2c_bus *smu_i2c = &adev->pm.smu_i2c[i]; 3e55845c3983d92 Likun Gao 2023-04-25 1559 struct i2c_adapter *control = &smu_i2c->adapter; 3e55845c3983d92 Likun Gao 2023-04-25 1560 3e55845c3983d92 Likun Gao 2023-04-25 1561 smu_i2c->adev = adev; 3e55845c3983d92 Likun Gao 2023-04-25 1562 smu_i2c->port = i; 3e55845c3983d92 Likun Gao 2023-04-25 1563 mutex_init(&smu_i2c->mutex); 3e55845c3983d92 Likun Gao 2023-04-25 1564 control->owner = THIS_MODULE; 3e55845c3983d92 Likun Gao 2023-04-25 @1565 control->class = I2C_CLASS_SPD; 3e55845c3983d92 Likun Gao 2023-04-25 1566 control->dev.parent = &adev->pdev->dev; 3e55845c3983d92 Likun Gao 2023-04-25 1567 control->algo = &smu_v14_0_2_i2c_algo; 3e55845c3983d92 Likun Gao 2023-04-25 1568 snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i); 3e55845c3983d92 Likun Gao 2023-04-25 1569 control->quirks = &smu_v14_0_2_i2c_control_quirks; 3e55845c3983d92 Likun Gao 2023-04-25 1570 i2c_set_adapdata(control, smu_i2c); 3e55845c3983d92 Likun Gao 2023-04-25 1571 3e55845c3983d92 Likun Gao 2023-04-25 1572 res = i2c_add_adapter(control); 3e55845c3983d92 Likun Gao 2023-04-25 1573 if (res) { 3e55845c3983d92 Likun Gao 2023-04-25 1574 DRM_ERROR("Failed to register hw i2c, err: %d\n", res); 3e55845c3983d92 Likun Gao 2023-04-25 1575 goto Out_err; 3e55845c3983d92 Likun Gao 2023-04-25 1576 } 3e55845c3983d92 Likun Gao 2023-04-25 1577 } 3e55845c3983d92 Likun Gao 2023-04-25 1578 3e55845c3983d92 Likun Gao 2023-04-25 1579 /* assign the buses used for the FRU EEPROM and RAS EEPROM */ 3e55845c3983d92 Likun Gao 2023-04-25 1580 /* XXX ideally this would be something in a vbios data table */ 3e55845c3983d92 Likun Gao 2023-04-25 1581 adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[1].adapter; 3e55845c3983d92 Likun Gao 2023-04-25 1582 adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter; 3e55845c3983d92 Likun Gao 2023-04-25 1583 3e55845c3983d92 Likun Gao 2023-04-25 1584 return 0; 3e55845c3983d92 Likun Gao 2023-04-25 1585 Out_err: 3e55845c3983d92 Likun Gao 2023-04-25 1586 for ( ; i >= 0; i--) { 3e55845c3983d92 Likun Gao 2023-04-25 1587 struct amdgpu_smu_i2c_bus *smu_i2c = &adev->pm.smu_i2c[i]; 3e55845c3983d92 Likun Gao 2023-04-25 1588 struct i2c_adapter *control = &smu_i2c->adapter; 3e55845c3983d92 Likun Gao 2023-04-25 1589 3e55845c3983d92 Likun Gao 2023-04-25 1590 i2c_del_adapter(control); 3e55845c3983d92 Likun Gao 2023-04-25 1591 } 3e55845c3983d92 Likun Gao 2023-04-25 1592 return res; 3e55845c3983d92 Likun Gao 2023-04-25 1593 } 3e55845c3983d92 Likun Gao 2023-04-25 1594 :::::: The code at line 1565 was first introduced by commit :::::: 3e55845c3983d92e28517a545e403b5eb9acf95b drm/amd/swsmu: add smu v14_0_2 support :::::: TO: Likun Gao <Likun.Gao@xxxxxxx> :::::: CC: Alex Deucher <alexander.deucher@xxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki