From: kernel test robot <lkp@intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Sasha Levin <sashal@kernel.org>,
Wolfram Sang <wsa-dev@sang-engineering.com>
Subject: [cel:nfsd-5.10.y 104/169] drivers/i2c/i2c-core-base.c:101:31: error: passing 'const struct device *' to parameter of type 'struct device *' discards qualifiers
Date: Sun, 6 Oct 2024 11:36:51 +0800 [thread overview]
Message-ID: <202410061127.DJKet1me-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-5.10.y
head: 515eb04a8b0667cd6d18d68b08ef33afbd02845b
commit: 485dd5c359970c7a431596bcd8c4469362915eba [104/169] i2c: Add i2c_get_match_data()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241006/202410061127.DJKet1me-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241006/202410061127.DJKet1me-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/202410061127.DJKet1me-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/i2c/i2c-core-base.c:101:31: error: passing 'const struct device *' to parameter of type 'struct device *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
101 | data = device_get_match_data(&client->dev);
| ^~~~~~~~~~~~
include/linux/property.h:382:50: note: passing argument to parameter 'dev' here
382 | const void *device_get_match_data(struct device *dev);
| ^
1 error generated.
vim +101 drivers/i2c/i2c-core-base.c
94
95 const void *i2c_get_match_data(const struct i2c_client *client)
96 {
97 struct i2c_driver *driver = to_i2c_driver(client->dev.driver);
98 const struct i2c_device_id *match;
99 const void *data;
100
> 101 data = device_get_match_data(&client->dev);
102 if (!data) {
103 match = i2c_match_id(driver->id_table, client);
104 if (!match)
105 return NULL;
106
107 data = (const void *)match->driver_data;
108 }
109
110 return data;
111 }
112 EXPORT_SYMBOL(i2c_get_match_data);
113
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-10-06 3:37 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=202410061127.DJKet1me-lkp@intel.com \
--to=lkp@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=wsa-dev@sang-engineering.com \
/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;
as well as URLs for NNTP newsgroup(s).