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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202408270946.gKlAW6oT-lkp@intel.com>
Date: Tue, 27 Aug 2024 09:01:27 +0800
From: kernel test robot <lkp@...el.com>
To: Kunwu Chan <kunwu.chan@...ux.dev>, nipun.gupta@....com,
	nikhil.agarwal@....com
Cc: llvm@...ts.linux.dev, 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 errors:

[auto build test ERROR on linus/master]
[also build test ERROR 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-allmodconfig (https://download.01.org/0day-ci/archive/20240827/202408270946.gKlAW6oT-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 08e5a1de8227512d4774a534b91cb2353cef6284)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/202408270946.gKlAW6oT-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/202408270946.gKlAW6oT-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/cdx/cdx.c:66:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:503:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     503 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     504 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:510:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     510 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     511 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:523:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     523 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     524 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/cdx/cdx.c:615:25: error: passing 'const struct bus_type *' to parameter of type 'struct bus_type *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     615 |         cdx_unregister_devices(&cdx_bus_type);
         |                                ^~~~~~~~~~~~~
   drivers/cdx/cdx.c:173:53: note: passing argument to parameter 'bus' here
     173 | static void cdx_unregister_devices(struct bus_type *bus)
         |                                                     ^
   4 warnings and 1 error generated.


vim +615 drivers/cdx/cdx.c

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