Re: [PATCH v1 1/1] spi: Introduce spi_get_device_match_data() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on linus/master v6.0-rc6 next-20220921]
[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/Andy-Shevchenko/spi-Introduce-spi_get_device_match_data-helper/20220922-044658
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: x86_64-randconfig-a013 (https://download.01.org/0day-ci/archive/20220922/202209221154.aGU73pNV-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/4d7a10e29738f98137b08b2dcc0297535dd92a11
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/spi-Introduce-spi_get_device_match_data-helper/20220922-044658
        git checkout 4d7a10e29738f98137b08b2dcc0297535dd92a11
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/spi/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/spi/spi.c: In function 'spi_get_device_match_data':
>> drivers/spi/spi.c:367:39: warning: passing argument 1 of 'device_get_match_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     367 |         match = device_get_match_data(&sdev->dev);
         |                                       ^~~~~~~~~~
   In file included from include/linux/of.h:22,
                    from include/linux/of_device.h:9,
                    from drivers/spi/spi.c:14:
   include/linux/property.h:390:50: note: expected 'struct device *' but argument is of type 'const struct device *'
     390 | const void *device_get_match_data(struct device *dev);
         |                                   ~~~~~~~~~~~~~~~^~~


vim +367 drivers/spi/spi.c

   362	
   363	const void *spi_get_device_match_data(const struct spi_device *sdev)
   364	{
   365		const void *match;
   366	
 > 367		match = device_get_match_data(&sdev->dev);
   368		if (match)
   369			return match;
   370	
   371		return (const void *)spi_get_device_id(sdev)->driver_data;
   372	}
   373	EXPORT_SYMBOL_GPL(spi_get_device_match_data);
   374	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux