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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202408262114.VRSL0Knh-lkp@intel.com>
Date: Mon, 26 Aug 2024 21:41:01 +0800
From: kernel test robot <lkp@...el.com>
To: Kunwu Chan <kunwu.chan@...ux.dev>, nipun.gupta@....com,
	nikhil.agarwal@....com
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Kunwu Chan <chentao@...inos.cn>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] cdx: make cdx_bus_type constant

Hi Kunwu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.11-rc5 next-20240826]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Kunwu-Chan/cdx-make-cdx_bus_type-constant/20240826-123621
base:   linus/master
patch link:    https://lore.kernel.org/r/20240823071412.130246-1-kunwu.chan%40linux.dev
patch subject: [PATCH] cdx: make cdx_bus_type constant
config: arm64-randconfig-002-20240826 (https://download.01.org/0day-ci/archive/20240826/202408262114.VRSL0Knh-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240826/202408262114.VRSL0Knh-lkp@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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408262114.VRSL0Knh-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/cdx/cdx.c: In function 'rescan_store':
>> drivers/cdx/cdx.c:615:32: warning: passing argument 1 of 'cdx_unregister_devices' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     615 |         cdx_unregister_devices(&cdx_bus_type);
         |                                ^~~~~~~~~~~~~
   drivers/cdx/cdx.c:173:53: note: expected 'struct bus_type *' but argument is of type 'const struct bus_type *'
     173 | static void cdx_unregister_devices(struct bus_type *bus)
         |                                    ~~~~~~~~~~~~~~~~~^~~


vim +615 drivers/cdx/cdx.c

cf60af04edfe51f Abhijit Gangurde 2023-12-22  597  
d06f5a3f7140921 Linus Torvalds   2023-04-27  598  static ssize_t rescan_store(const struct bus_type *bus,
2959ab247061e67 Nipun Gupta      2023-03-13  599  			    const char *buf, size_t count)
2959ab247061e67 Nipun Gupta      2023-03-13  600  {
2959ab247061e67 Nipun Gupta      2023-03-13  601  	struct cdx_controller *cdx;
54b406e10f0334e Abhijit Gangurde 2023-10-17  602  	struct platform_device *pd;
54b406e10f0334e Abhijit Gangurde 2023-10-17  603  	struct device_node *np;
2959ab247061e67 Nipun Gupta      2023-03-13  604  	bool val;
2959ab247061e67 Nipun Gupta      2023-03-13  605  
2959ab247061e67 Nipun Gupta      2023-03-13  606  	if (kstrtobool(buf, &val) < 0)
2959ab247061e67 Nipun Gupta      2023-03-13  607  		return -EINVAL;
2959ab247061e67 Nipun Gupta      2023-03-13  608  
2959ab247061e67 Nipun Gupta      2023-03-13  609  	if (!val)
2959ab247061e67 Nipun Gupta      2023-03-13  610  		return -EINVAL;
2959ab247061e67 Nipun Gupta      2023-03-13  611  
f0af816834667b6 Abhijit Gangurde 2023-10-17  612  	mutex_lock(&cdx_controller_lock);
f0af816834667b6 Abhijit Gangurde 2023-10-17  613  
2959ab247061e67 Nipun Gupta      2023-03-13  614  	/* Unregister all the devices on the bus */
2959ab247061e67 Nipun Gupta      2023-03-13 @615  	cdx_unregister_devices(&cdx_bus_type);
2959ab247061e67 Nipun Gupta      2023-03-13  616  
2959ab247061e67 Nipun Gupta      2023-03-13  617  	/* Rescan all the devices */
54b406e10f0334e Abhijit Gangurde 2023-10-17  618  	for_each_compatible_node(np, NULL, compat_node_name) {
54b406e10f0334e Abhijit Gangurde 2023-10-17  619  		pd = of_find_device_by_node(np);
87736ae12e1427b Dan Carpenter    2024-01-02  620  		if (!pd) {
87736ae12e1427b Dan Carpenter    2024-01-02  621  			of_node_put(np);
1960932eef9183e Dan Carpenter    2024-01-02  622  			count = -EINVAL;
1960932eef9183e Dan Carpenter    2024-01-02  623  			goto unlock;
87736ae12e1427b Dan Carpenter    2024-01-02  624  		}
54b406e10f0334e Abhijit Gangurde 2023-10-17  625  
54b406e10f0334e Abhijit Gangurde 2023-10-17  626  		cdx = platform_get_drvdata(pd);
54b406e10f0334e Abhijit Gangurde 2023-10-17  627  		if (cdx && cdx->controller_registered && cdx->ops->scan)
54b406e10f0334e Abhijit Gangurde 2023-10-17  628  			cdx->ops->scan(cdx);
54b406e10f0334e Abhijit Gangurde 2023-10-17  629  
54b406e10f0334e Abhijit Gangurde 2023-10-17  630  		put_device(&pd->dev);
2959ab247061e67 Nipun Gupta      2023-03-13  631  	}
2959ab247061e67 Nipun Gupta      2023-03-13  632  
1960932eef9183e Dan Carpenter    2024-01-02  633  unlock:
f0af816834667b6 Abhijit Gangurde 2023-10-17  634  	mutex_unlock(&cdx_controller_lock);
f0af816834667b6 Abhijit Gangurde 2023-10-17  635  
2959ab247061e67 Nipun Gupta      2023-03-13  636  	return count;
2959ab247061e67 Nipun Gupta      2023-03-13  637  }
2959ab247061e67 Nipun Gupta      2023-03-13  638  static BUS_ATTR_WO(rescan);
2959ab247061e67 Nipun Gupta      2023-03-13  639  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ