public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kunwu Chan <kunwu.chan@linux.dev>,
	nipun.gupta@amd.com, nikhil.agarwal@amd.com
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Kunwu Chan <chentao@kylinos.cn>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] cdx: make cdx_bus_type constant
Date: Mon, 26 Aug 2024 21:41:01 +0800	[thread overview]
Message-ID: <202408262114.VRSL0Knh-lkp@intel.com> (raw)
In-Reply-To: <20240823071412.130246-1-kunwu.chan@linux.dev>

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@intel.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

  reply	other threads:[~2024-08-26 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-23  7:14 [PATCH] cdx: make cdx_bus_type constant Kunwu Chan
2024-08-26 13:41 ` kernel test robot [this message]
2024-08-27  1:01 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-07-01 11:14 Greg Kroah-Hartman
2025-07-01 14:29 ` Gupta, Nipun
2025-09-14 13:42 Greg Kroah-Hartman
2025-09-15  9:42 ` Gupta, Nipun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202408262114.VRSL0Knh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chentao@kylinos.cn \
    --cc=gregkh@linuxfoundation.org \
    --cc=kunwu.chan@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikhil.agarwal@amd.com \
    --cc=nipun.gupta@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox