llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [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
@ 2024-10-06  3:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-06  3:36 UTC (permalink / raw)
  To: Biju Das; +Cc: llvm, oe-kbuild-all, Sasha Levin, Wolfram Sang

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-06  3:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06  3:36 [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 kernel test robot

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).