[gpio:gpiochip-no-driver-h 2/2] drivers/input/keyboard/adp5589-keys.c:391:23: warning: incompatible integer to pointer conversion initializing 'struct adp5589_kpad *' with an expression of type 'int'
From: kernel test robot <hidden>
Date: 2021-08-16 02:31:09
Also in:
oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpiochip-no-driver-h head: 3357a6b5d4c178fcbe95eb72c4e653b3a5b41569 commit: 3357a6b5d4c178fcbe95eb72c4e653b3a5b41569 [2/2] See what explodes if we apply this patch config: x86_64-randconfig-c001-20210816 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7776b19eed44906e9973bfb240b6279d6feaab41) 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://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?id=3357a6b5d4c178fcbe95eb72c4e653b3a5b41569 git remote add gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git git fetch --no-tags gpio gpiochip-no-driver-h git checkout 3357a6b5d4c178fcbe95eb72c4e653b3a5b41569 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): In file included from drivers/input/keyboard/adp5589-keys.c:21: In file included from include/linux/gpio.h:62: include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip' [-Werror,-Wimplicit-function-declaration] return gpiod_to_chip(gpio_to_desc(gpio)); ^ include/asm-generic/gpio.h:58:9: note: did you mean 'gpio_to_chip'? include/asm-generic/gpio.h:56:33: note: 'gpio_to_chip' declared here static inline struct gpio_chip *gpio_to_chip(unsigned gpio) ^ include/asm-generic/gpio.h:58:9: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'struct gpio_chip *' [-Wint-conversion] return gpiod_to_chip(gpio_to_desc(gpio)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/input/keyboard/adp5589-keys.c:243:19: error: field has incomplete type 'struct gpio_chip' struct gpio_chip gc; ^ include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip' static inline struct gpio_chip *gpio_to_chip(unsigned gpio) ^ drivers/input/keyboard/adp5589-keys.c:391:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration] struct adp5589_kpad *kpad = gpiochip_get_data(chip); ^
quoted
drivers/input/keyboard/adp5589-keys.c:391:23: warning: incompatible integer to pointer conversion initializing 'struct adp5589_kpad *' with an expression of type 'int' [-Wint-conversion]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/keyboard/adp5589-keys.c:403:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^
drivers/input/keyboard/adp5589-keys.c:403:23: warning: incompatible integer to pointer conversion initializing 'struct adp5589_kpad *' with an expression of type 'int' [-Wint-conversion]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/keyboard/adp5589-keys.c:422:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^
drivers/input/keyboard/adp5589-keys.c:422:23: warning: incompatible integer to pointer conversion initializing 'struct adp5589_kpad *' with an expression of type 'int' [-Wint-conversion]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/keyboard/adp5589-keys.c:442:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^
drivers/input/keyboard/adp5589-keys.c:442:23: warning: incompatible integer to pointer conversion initializing 'struct adp5589_kpad *' with an expression of type 'int' [-Wint-conversion]
struct adp5589_kpad *kpad = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/input/keyboard/adp5589-keys.c:528:10: error: implicit declaration of function 'devm_gpiochip_add_data' [-Werror,-Wimplicit-function-declaration]
error = devm_gpiochip_add_data(dev, &kpad->gc, kpad);
^
5 warnings and 7 errors generated.
vim +391 drivers/input/keyboard/adp5589-keys.c
9d2e173644bb5c Michael Hennerich 2011-05-19 387
9d2e173644bb5c Michael Hennerich 2011-05-19 388 #ifdef CONFIG_GPIOLIB
9d2e173644bb5c Michael Hennerich 2011-05-19 389 static int adp5589_gpio_get_value(struct gpio_chip *chip, unsigned off)
9d2e173644bb5c Michael Hennerich 2011-05-19 390 {
839850f4fb76b5 Linus Walleij 2015-12-08 @391 struct adp5589_kpad *kpad = gpiochip_get_data(chip);
3f48e735435851 Michael Hennerich 2011-10-18 392 unsigned int bank = kpad->var->bank(kpad->gpiomap[off]);
3f48e735435851 Michael Hennerich 2011-10-18 393 unsigned int bit = kpad->var->bit(kpad->gpiomap[off]);
9d2e173644bb5c Michael Hennerich 2011-05-19 394
3f48e735435851 Michael Hennerich 2011-10-18 395 return !!(adp5589_read(kpad->client,
3f48e735435851 Michael Hennerich 2011-10-18 396 kpad->var->reg(ADP5589_GPI_STATUS_A) + bank) &
9d2e173644bb5c Michael Hennerich 2011-05-19 397 bit);
9d2e173644bb5c Michael Hennerich 2011-05-19 398 }
9d2e173644bb5c Michael Hennerich 2011-05-19 399
:::::: The code at line 391 was first introduced by commit
:::::: 839850f4fb76b56fcad3cabe27fc9f1a03821a2c input: adp5589-keys: use gpiochip data pointer
:::::: TO: Linus Walleij [off-list ref]
:::::: CC: Linus Walleij [off-list ref]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 39601 bytes