lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 15 Oct 2017 18:53:21 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Bhumika Goyal <bhumirks@...il.com>
Cc:     kbuild-all@...org, julia.lawall@...6.fr, kishon@...com,
        bhelgaas@...gle.com, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, Bhumika Goyal <bhumirks@...il.com>
Subject: Re: [PATCH] PCI: endpoint: make config_item_type const

Hi Bhumika,

[auto build test WARNING on pci/next]
[also build test WARNING on v4.14-rc4 next-20171013]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Bhumika-Goyal/PCI-endpoint-make-config_item_type-const/20171015-175843
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-randconfig-s1-201742+CONFIG_DEBUG_INFO_REDUCED (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/pci/endpoint/pci-ep-cfs.c: In function 'pci_ep_cfs_add_epc_group':
>> drivers/pci/endpoint/pci-ep-cfs.c:174:43: warning: passing argument 3 of 'config_group_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     config_group_init_type_name(group, name, &pci_epc_type);
                                              ^
   In file included from include/linux/pci-ep-cfs.h:15:0,
                    from drivers/pci/endpoint/pci-ep-cfs.c:25:
   include/linux/configfs.h:102:13: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    extern void config_group_init_type_name(struct config_group *group,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/endpoint/pci-ep-cfs.c: In function 'pci_epf_make':
   drivers/pci/endpoint/pci-ep-cfs.c:380:55: warning: passing argument 3 of 'config_group_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     config_group_init_type_name(&epf_group->group, name, &pci_epf_type);
                                                          ^
   In file included from include/linux/pci-ep-cfs.h:15:0,
                    from drivers/pci/endpoint/pci-ep-cfs.c:25:
   include/linux/configfs.h:102:13: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    extern void config_group_init_type_name(struct config_group *group,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/endpoint/pci-ep-cfs.c: In function 'pci_ep_cfs_add_epf_group':
>> drivers/pci/endpoint/pci-ep-cfs.c:413:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &pci_epf_group_type);
          ^
   In file included from include/linux/pci-ep-cfs.h:15:0,
                    from drivers/pci/endpoint/pci-ep-cfs.c:25:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/endpoint/pci-ep-cfs.c: At top level:
>> drivers/pci/endpoint/pci-ep-cfs.c:447:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
       .ci_type = &pci_ep_type,
                  ^
   drivers/pci/endpoint/pci-ep-cfs.c: In function 'pci_ep_cfs_init':
   drivers/pci/endpoint/pci-ep-cfs.c:468:10: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
             &pci_functions_type);
             ^
   In file included from include/linux/pci-ep-cfs.h:15:0,
                    from drivers/pci/endpoint/pci-ep-cfs.c:25:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/endpoint/pci-ep-cfs.c:478:7: warning: passing argument 3 of 'configfs_register_default_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
          &pci_controllers_type);
          ^
   In file included from include/linux/pci-ep-cfs.h:15:0,
                    from drivers/pci/endpoint/pci-ep-cfs.c:25:
   include/linux/configfs.h:262:1: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    configfs_register_default_group(struct config_group *parent_group,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +174 drivers/pci/endpoint/pci-ep-cfs.c

d7467991 Kishon Vijay Abraham I 2017-03-27  158  
d7467991 Kishon Vijay Abraham I 2017-03-27  159  struct config_group *pci_ep_cfs_add_epc_group(const char *name)
d7467991 Kishon Vijay Abraham I 2017-03-27  160  {
d7467991 Kishon Vijay Abraham I 2017-03-27  161  	int ret;
d7467991 Kishon Vijay Abraham I 2017-03-27  162  	struct pci_epc *epc;
d7467991 Kishon Vijay Abraham I 2017-03-27  163  	struct config_group *group;
d7467991 Kishon Vijay Abraham I 2017-03-27  164  	struct pci_epc_group *epc_group;
d7467991 Kishon Vijay Abraham I 2017-03-27  165  
d7467991 Kishon Vijay Abraham I 2017-03-27  166  	epc_group = kzalloc(sizeof(*epc_group), GFP_KERNEL);
d7467991 Kishon Vijay Abraham I 2017-03-27  167  	if (!epc_group) {
d7467991 Kishon Vijay Abraham I 2017-03-27  168  		ret = -ENOMEM;
d7467991 Kishon Vijay Abraham I 2017-03-27  169  		goto err;
d7467991 Kishon Vijay Abraham I 2017-03-27  170  	}
d7467991 Kishon Vijay Abraham I 2017-03-27  171  
d7467991 Kishon Vijay Abraham I 2017-03-27  172  	group = &epc_group->group;
d7467991 Kishon Vijay Abraham I 2017-03-27  173  
d7467991 Kishon Vijay Abraham I 2017-03-27 @174  	config_group_init_type_name(group, name, &pci_epc_type);
d7467991 Kishon Vijay Abraham I 2017-03-27  175  	ret = configfs_register_group(controllers_group, group);
d7467991 Kishon Vijay Abraham I 2017-03-27  176  	if (ret) {
d7467991 Kishon Vijay Abraham I 2017-03-27  177  		pr_err("failed to register configfs group for %s\n", name);
d7467991 Kishon Vijay Abraham I 2017-03-27  178  		goto err_register_group;
d7467991 Kishon Vijay Abraham I 2017-03-27  179  	}
d7467991 Kishon Vijay Abraham I 2017-03-27  180  
d7467991 Kishon Vijay Abraham I 2017-03-27  181  	epc = pci_epc_get(name);
d7467991 Kishon Vijay Abraham I 2017-03-27  182  	if (IS_ERR(epc)) {
d7467991 Kishon Vijay Abraham I 2017-03-27  183  		ret = PTR_ERR(epc);
d7467991 Kishon Vijay Abraham I 2017-03-27  184  		goto err_epc_get;
d7467991 Kishon Vijay Abraham I 2017-03-27  185  	}
d7467991 Kishon Vijay Abraham I 2017-03-27  186  
d7467991 Kishon Vijay Abraham I 2017-03-27  187  	epc_group->epc = epc;
d7467991 Kishon Vijay Abraham I 2017-03-27  188  
d7467991 Kishon Vijay Abraham I 2017-03-27  189  	return group;
d7467991 Kishon Vijay Abraham I 2017-03-27  190  
d7467991 Kishon Vijay Abraham I 2017-03-27  191  err_epc_get:
d7467991 Kishon Vijay Abraham I 2017-03-27  192  	configfs_unregister_group(group);
d7467991 Kishon Vijay Abraham I 2017-03-27  193  
d7467991 Kishon Vijay Abraham I 2017-03-27  194  err_register_group:
d7467991 Kishon Vijay Abraham I 2017-03-27  195  	kfree(epc_group);
d7467991 Kishon Vijay Abraham I 2017-03-27  196  
d7467991 Kishon Vijay Abraham I 2017-03-27  197  err:
d7467991 Kishon Vijay Abraham I 2017-03-27  198  	return ERR_PTR(ret);
d7467991 Kishon Vijay Abraham I 2017-03-27  199  }
d7467991 Kishon Vijay Abraham I 2017-03-27  200  EXPORT_SYMBOL(pci_ep_cfs_add_epc_group);
d7467991 Kishon Vijay Abraham I 2017-03-27  201  

:::::: The code at line 174 was first introduced by commit
:::::: d746799116103d857be203382b09035bbe225d03 PCI: endpoint: Introduce configfs entry for configuring EP functions

:::::: TO: Kishon Vijay Abraham I <kishon@...com>
:::::: CC: Bjorn Helgaas <bhelgaas@...gle.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (24427 bytes)

Powered by blists - more mailing lists