tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.4
head: ca018b971e8a0de8ddb9f24e14d458b679bdd135
commit: ca018b971e8a0de8ddb9f24e14d458b679bdd135 [13/13] BACKPORT: spi: Add
driver_override SPI device attribute
config: h8300-randconfig-r021-20210212 (attached as .config)
compiler: h8300-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.4
git checkout ca018b971e8a0de8ddb9f24e14d458b679bdd135
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/spi/spi.c: In function 'driver_override_store':
> drivers/spi/spi.c:77:37: warning: signed and unsigned type in
conditional expression [-Wsign-compare]
const size_t len = end ? end - buf :
count;
^
drivers/spi/spi.c: In function 'spi_register_board_info':
drivers/spi/spi.c:718:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (i = 0; i < n; i++, bi++, info++) {
^
drivers/spi/spi.c: In function 'spi_write_then_read':
drivers/spi/spi.c:2774:20: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if ((n_tx + n_rx) > SPI_BUFSIZ || !mutex_trylock(&lock)) {
^
vim +77 drivers/spi/spi.c
70
71 static ssize_t driver_override_store(struct device *dev,
72 struct device_attribute *a,
73 const char *buf, size_t count)
74 {
75 struct spi_device *spi = to_spi_device(dev);
76 const char *end = memchr(buf, '\n', count);
77 const size_t len = end ? end - buf : count;
78 const
char *driver_override, *old;
79
80 /* We need to keep extra room for a newline when displaying value */
81 if (len >= (PAGE_SIZE - 1))
82 return -EINVAL;
83
84 driver_override = kstrndup(buf, len, GFP_KERNEL);
85 if (!driver_override)
86 return -ENOMEM;
87
88 device_lock(dev);
89 old = spi->driver_override;
90 if (len) {
91 spi->driver_override = driver_override;
92 } else {
93 /* Emptry string, disable driver override */
94 spi->driver_override = NULL;
95 kfree(driver_override);
96 }
97 device_unlock(dev);
98 kfree(old);
99
100 return count;
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org