tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
debugfs_cleanup
head:   766db77dfd694e14cfdc4728e9c2f6d747dfdf84
commit: 3baa931df8381661c94796a782d473e44391c0dc [6/7] platform/x86/amd/hsmp: 
switch to use device_add_groups()
config: x86_64-randconfig-005-20240326 
(https://download.01.org/0day-ci/archive/20240327/202403270318.bxcbiibe-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240327/202403270318.bxcbiibe-...@intel.com/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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202403270318.bxcbiibe-...@intel.com/

All warnings (new ones prefixed by >>):

   drivers/platform/x86/amd/hsmp.c: In function 'hsmp_create_non_acpi_sysfs_if':
   drivers/platform/x86/amd/hsmp.c:696:42: error: 'struct hsmp_plat_device' has 
no member named 'dev'
     696 |         return device_add_groups(plat_dev.dev, hsmp_attr_grps);
         |                                          ^
>> drivers/platform/x86/amd/hsmp.c:697:1: warning: control reaches end of 
>> non-void function [-Wreturn-type]
     697 | }
         | ^


vim +697 drivers/platform/x86/amd/hsmp.c

ca511e7631e76e0 Suma Hegde         2024-01-06  668  
ba8dcff0e9c4f8f Suma Hegde         2024-01-06  669  static int 
hsmp_create_non_acpi_sysfs_if(struct device *dev)
ca511e7631e76e0 Suma Hegde         2024-01-06  670  {
ca511e7631e76e0 Suma Hegde         2024-01-06  671      const struct 
attribute_group **hsmp_attr_grps;
5150542b8ec5fb5 Suma Hegde         2023-10-10  672      struct attribute_group 
*attr_grp;
5150542b8ec5fb5 Suma Hegde         2023-10-10  673      u16 i;
5150542b8ec5fb5 Suma Hegde         2023-10-10  674  
2b703fbe4e3d435 Suma Hegde         2024-01-25  675      hsmp_attr_grps = 
devm_kcalloc(dev, plat_dev.num_sockets + 1,
2b703fbe4e3d435 Suma Hegde         2024-01-25  676                              
      sizeof(*hsmp_attr_grps),
2b703fbe4e3d435 Suma Hegde         2024-01-25  677                              
      GFP_KERNEL);
5150542b8ec5fb5 Suma Hegde         2023-10-10  678      if (!hsmp_attr_grps)
5150542b8ec5fb5 Suma Hegde         2023-10-10  679              return -ENOMEM;
5150542b8ec5fb5 Suma Hegde         2023-10-10  680  
5150542b8ec5fb5 Suma Hegde         2023-10-10  681      /* Create a sysfs 
directory for each socket */
5150542b8ec5fb5 Suma Hegde         2023-10-10  682      for (i = 0; i < 
plat_dev.num_sockets; i++) {
ca511e7631e76e0 Suma Hegde         2024-01-06  683              attr_grp = 
devm_kzalloc(dev, sizeof(struct attribute_group),
ce08d3570ae0ef3 Suma Hegde         2024-01-06  684                              
        GFP_KERNEL);
5150542b8ec5fb5 Suma Hegde         2023-10-10  685              if (!attr_grp)
5150542b8ec5fb5 Suma Hegde         2023-10-10  686                      return 
-ENOMEM;
5150542b8ec5fb5 Suma Hegde         2023-10-10  687  
5150542b8ec5fb5 Suma Hegde         2023-10-10  688              
snprintf(plat_dev.sock[i].name, HSMP_ATTR_GRP_NAME_SIZE, "socket%u", (u8)i);
5150542b8ec5fb5 Suma Hegde         2023-10-10  689              attr_grp->name  
                = plat_dev.sock[i].name;
5150542b8ec5fb5 Suma Hegde         2023-10-10  690              
attr_grp->is_bin_visible        = hsmp_is_sock_attr_visible;
5150542b8ec5fb5 Suma Hegde         2023-10-10  691              
hsmp_attr_grps[i]               = attr_grp;
5150542b8ec5fb5 Suma Hegde         2023-10-10  692  
ca511e7631e76e0 Suma Hegde         2024-01-06  693              
hsmp_create_attr_list(attr_grp, dev, i);
5150542b8ec5fb5 Suma Hegde         2023-10-10  694      }
ca511e7631e76e0 Suma Hegde         2024-01-06  695  
3baa931df838166 Greg Kroah-Hartman 2024-01-28  696      return 
device_add_groups(plat_dev.dev, hsmp_attr_grps);
5150542b8ec5fb5 Suma Hegde         2023-10-10 @697  }
5150542b8ec5fb5 Suma Hegde         2023-10-10  698  

:::::: The code at line 697 was first introduced by commit
:::::: 5150542b8ec5fb561be080ed0ef3bab8598154c3 platform/x86/amd/hsmp: add 
support for metrics tbl

:::::: TO: Suma Hegde <suma.he...@amd.com>
:::::: CC: Ilpo Järvinen <ilpo.jarvi...@linux.intel.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to