From: kernel test robot <lkp@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: oe-kbuild-all@lists.linux.dev, devel@driverdev.osuosl.org
Subject: [driver-core:kobject-const 25/25] drivers/dma/idxd/compat.c:19:32: warning: initialization discards 'const' qualifier from pointer target type
Date: Wed, 1 Feb 2023 02:48:25 +0800 [thread overview]
Message-ID: <202302010222.N9SSmGUP-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head: ab566595bfc8de2e05e5174796f04997d7c01fb3
commit: ab566595bfc8de2e05e5174796f04997d7c01fb3 [25/25] bus: remove the "p" pointer in struct bus_type
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230201/202302010222.N9SSmGUP-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=ab566595bfc8de2e05e5174796f04997d7c01fb3
git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
git fetch --no-tags driver-core kobject-const
git checkout ab566595bfc8de2e05e5174796f04997d7c01fb3
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma/idxd/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/dma/idxd/compat.c: In function 'unbind_store':
>> drivers/dma/idxd/compat.c:19:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
19 | struct bus_type *bus = drv->bus;
| ^~~
drivers/dma/idxd/compat.c: In function 'bind_store':
drivers/dma/idxd/compat.c:35:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
35 | struct bus_type *bus = drv->bus;
| ^~~
vim +/const +19 drivers/dma/idxd/compat.c
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 12
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 13 #define DRIVER_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 14 struct driver_attribute driver_attr_##_name = \
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 15 __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 16
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 17 static ssize_t unbind_store(struct device_driver *drv, const char *buf, size_t count)
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 18 {
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 @19 struct bus_type *bus = drv->bus;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 20 struct device *dev;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 21 int rc = -ENODEV;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 22
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 23 dev = bus_find_device_by_name(bus, NULL, buf);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 24 if (dev && dev->driver) {
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 25 device_driver_detach(dev);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 26 rc = count;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 27 }
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 28
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 29 return rc;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 30 }
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 31 static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 32
:::::: The code at line 19 was first introduced by commit
:::::: 6e7f3ee97bbe2c7d7a53b7dbd7a08a579e03c8c9 dmaengine: idxd: move dsa_drv support to compatible mode
:::::: TO: Dave Jiang <dave.jiang@intel.com>
:::::: CC: Vinod Koul <vkoul@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-01-31 18:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202302010222.N9SSmGUP-lkp@intel.com \
--to=lkp@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.