[asahilinux:bits/090-spi-hid 11/11] drivers/hid/spi-hid/spi-hid-apple-core.c:259:22: warning: no previous prototype for 'spihid_get_data'
From: kernel test robot
Date: Tue May 03 2022 - 11:18:02 EST
tree: https://github.com/AsahiLinux/linux bits/090-spi-hid
head: 11b586fd5cff82ad72e9a281c0deb27959d16857
commit: 11b586fd5cff82ad72e9a281c0deb27959d16857 [11/11] WIP: HID: transport: spi: add Apple SPI transport
config: h8300-allmodconfig (https://download.01.org/0day-ci/archive/20220503/202205032332.JmX0xZHq-lkp@xxxxxxxxx/config)
compiler: h8300-linux-gcc (GCC) 11.3.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
# https://github.com/AsahiLinux/linux/commit/11b586fd5cff82ad72e9a281c0deb27959d16857
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux bits/090-spi-hid
git checkout 11b586fd5cff82ad72e9a281c0deb27959d16857
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/hid/spi-hid/ drivers/platform/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from include/uapi/linux/swab.h:6,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:14,
from include/linux/byteorder/big_endian.h:5,
from arch/h8300/include/asm/byteorder.h:5,
from include/asm-generic/unaligned.h:10,
from ./arch/h8300/include/generated/asm/unaligned.h:1,
from drivers/hid/spi-hid/spi-hid-apple-core.c:19:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:160:9: note: in expansion of macro 'BUG_ON'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:160:17: note: in expansion of macro 'virt_addr_valid'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/hid/spi-hid/spi-hid-apple-core.c: At top level:
>> drivers/hid/spi-hid/spi-hid-apple-core.c:259:22: warning: no previous prototype for 'spihid_get_data' [-Wmissing-prototypes]
259 | struct spihid_apple *spihid_get_data(struct spihid_interface *idev)
| ^~~~~~~~~~~~~~~
--
In file included from include/asm-generic/div64.h:27,
from ./arch/h8300/include/generated/asm/div64.h:1,
from include/linux/math.h:6,
from include/linux/delay.h:22,
from drivers/hid/spi-hid/spi-hid-apple-of.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:160:9: note: in expansion of macro 'BUG_ON'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:160:17: note: in expansion of macro 'virt_addr_valid'
160 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/hid/spi-hid/spi-hid-apple-of.c: At top level:
>> drivers/hid/spi-hid/spi-hid-apple-of.c:24:5: warning: no previous prototype for 'spihid_apple_of_power_on' [-Wmissing-prototypes]
24 | int spihid_apple_of_power_on(struct spihid_apple_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple-of.c:40:5: warning: no previous prototype for 'spihid_apple_of_power_off' [-Wmissing-prototypes]
40 | int spihid_apple_of_power_off(struct spihid_apple_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple-of.c:50:5: warning: no previous prototype for 'spihid_apple_of_enable_irq' [-Wmissing-prototypes]
50 | int spihid_apple_of_enable_irq(struct spihid_apple_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/hid/spi-hid/spi-hid-apple-of.c:59:5: warning: no previous prototype for 'spihid_apple_of_disable_irq' [-Wmissing-prototypes]
59 | int spihid_apple_of_disable_irq(struct spihid_apple_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/spihid_get_data +259 drivers/hid/spi-hid/spi-hid-apple-core.c
258
> 259 struct spihid_apple *spihid_get_data(struct spihid_interface *idev)
260 {
261 switch (idev->id) {
262 case SPIHID_DEVICE_ID_KBD:
263 return container_of(idev, struct spihid_apple, kbd);
264 case SPIHID_DEVICE_ID_TP:
265 return container_of(idev, struct spihid_apple, tp);
266 default:
267 return NULL;
268 }
269 }
270
--
0-DAY CI Kernel Test Service
https://01.org/lkp