tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
debugfs_cleanup
head:   447e92735758c923913ee53b75c6b92ef756985b
commit: bd0388a53cc216e4d4b367b37565e87c3147d25d [6/7] driver core: remove 
devm_device_add_groups()
config: x86_64-randconfig-005-20231104 
(https://download.01.org/0day-ci/archive/20231105/202311050113.qcp9dss3-...@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/20231105/202311050113.qcp9dss3-...@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/202311050113.qcp9dss3-...@intel.com/

All errors (new ones prefixed by >>):

   drivers/platform/x86/amd/hsmp.c: In function 'hsmp_create_sysfs_interface':
>> drivers/platform/x86/amd/hsmp.c:474:16: error: implicit declaration of 
>> function 'devm_device_add_groups'; did you mean 'devm_device_add_group'? 
>> [-Werror=implicit-function-declaration]
     474 |         return devm_device_add_groups(plat_dev.dev, hsmp_attr_grps);
         |                ^~~~~~~~~~~~~~~~~~~~~~
         |                devm_device_add_group
   cc1: some warnings being treated as errors


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

5150542b8ec5fb Suma Hegde 2023-10-10  432  
5150542b8ec5fb Suma Hegde 2023-10-10  433  static int 
hsmp_create_sysfs_interface(void)
5150542b8ec5fb Suma Hegde 2023-10-10  434  {
5150542b8ec5fb Suma Hegde 2023-10-10  435       const struct attribute_group 
**hsmp_attr_grps;
5150542b8ec5fb Suma Hegde 2023-10-10  436       struct bin_attribute 
**hsmp_bin_attrs;
5150542b8ec5fb Suma Hegde 2023-10-10  437       struct attribute_group 
*attr_grp;
5150542b8ec5fb Suma Hegde 2023-10-10  438       int ret;
5150542b8ec5fb Suma Hegde 2023-10-10  439       u16 i;
5150542b8ec5fb Suma Hegde 2023-10-10  440  
5150542b8ec5fb Suma Hegde 2023-10-10  441       /* String formatting is 
currently limited to u8 sockets */
5150542b8ec5fb Suma Hegde 2023-10-10  442       if 
(WARN_ON(plat_dev.num_sockets > U8_MAX))
5150542b8ec5fb Suma Hegde 2023-10-10  443               return -ERANGE;
5150542b8ec5fb Suma Hegde 2023-10-10  444  
5150542b8ec5fb Suma Hegde 2023-10-10  445       hsmp_attr_grps = 
devm_kzalloc(plat_dev.dev, sizeof(struct attribute_group *) *
5150542b8ec5fb Suma Hegde 2023-10-10  446                                     
(plat_dev.num_sockets + 1), GFP_KERNEL);
5150542b8ec5fb Suma Hegde 2023-10-10  447       if (!hsmp_attr_grps)
5150542b8ec5fb Suma Hegde 2023-10-10  448               return -ENOMEM;
5150542b8ec5fb Suma Hegde 2023-10-10  449  
5150542b8ec5fb Suma Hegde 2023-10-10  450       /* Create a sysfs directory for 
each socket */
5150542b8ec5fb Suma Hegde 2023-10-10  451       for (i = 0; i < 
plat_dev.num_sockets; i++) {
5150542b8ec5fb Suma Hegde 2023-10-10  452               attr_grp = 
devm_kzalloc(plat_dev.dev, sizeof(struct attribute_group), GFP_KERNEL);
5150542b8ec5fb Suma Hegde 2023-10-10  453               if (!attr_grp)
5150542b8ec5fb Suma Hegde 2023-10-10  454                       return -ENOMEM;
5150542b8ec5fb Suma Hegde 2023-10-10  455  
5150542b8ec5fb Suma Hegde 2023-10-10  456               
snprintf(plat_dev.sock[i].name, HSMP_ATTR_GRP_NAME_SIZE, "socket%u", (u8)i);
5150542b8ec5fb Suma Hegde 2023-10-10  457               attr_grp->name = 
plat_dev.sock[i].name;
5150542b8ec5fb Suma Hegde 2023-10-10  458  
5150542b8ec5fb Suma Hegde 2023-10-10  459               /* Null terminated list 
of attributes */
5150542b8ec5fb Suma Hegde 2023-10-10  460               hsmp_bin_attrs = 
devm_kzalloc(plat_dev.dev, sizeof(struct bin_attribute *) *
5150542b8ec5fb Suma Hegde 2023-10-10  461                                       
      (NUM_HSMP_ATTRS + 1), GFP_KERNEL);
5150542b8ec5fb Suma Hegde 2023-10-10  462               if (!hsmp_bin_attrs)
5150542b8ec5fb Suma Hegde 2023-10-10  463                       return -ENOMEM;
5150542b8ec5fb Suma Hegde 2023-10-10  464  
5150542b8ec5fb Suma Hegde 2023-10-10  465               attr_grp->bin_attrs     
        = hsmp_bin_attrs;
5150542b8ec5fb Suma Hegde 2023-10-10  466               
attr_grp->is_bin_visible        = hsmp_is_sock_attr_visible;
5150542b8ec5fb Suma Hegde 2023-10-10  467               hsmp_attr_grps[i]       
        = attr_grp;
5150542b8ec5fb Suma Hegde 2023-10-10  468  
5150542b8ec5fb Suma Hegde 2023-10-10  469               /* Now create the leaf 
nodes */
5150542b8ec5fb Suma Hegde 2023-10-10  470               ret = 
hsmp_init_metric_tbl_bin_attr(hsmp_bin_attrs, i);
5150542b8ec5fb Suma Hegde 2023-10-10  471               if (ret)
5150542b8ec5fb Suma Hegde 2023-10-10  472                       return ret;
5150542b8ec5fb Suma Hegde 2023-10-10  473       }
5150542b8ec5fb Suma Hegde 2023-10-10 @474       return 
devm_device_add_groups(plat_dev.dev, hsmp_attr_grps);
5150542b8ec5fb Suma Hegde 2023-10-10  475  }
5150542b8ec5fb Suma Hegde 2023-10-10  476  

:::::: The code at line 474 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