[xlnx:xlnx_rebase_v5.4 1277/1452] drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
kernel test robot
lkp at intel.com
Wed Aug 12 05:27:26 EDT 2020
Hi Michal,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: bb8c1c9c0b132b50f6199d2e8cfcf0157544e9cc
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1452] gpio: xilinx: Use xilinx tested gpio driver
config: alpha-randconfig-r034-20200812 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.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
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
68 | struct of_mm_gpio_chip mmchip;
| ^~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_get':
drivers/gpio/gpio-xilinx.c:94:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror=implicit-function-declaration]
94 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:94:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
In file included from arch/alpha/include/asm/compiler.h:11,
from arch/alpha/include/asm/bitops.h:9,
from include/linux/bitops.h:26,
from drivers/gpio/gpio-xilinx.c:15:
include/linux/kernel.h:994:32: error: dereferencing pointer to incomplete type 'struct of_mm_gpio_chip'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
330 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
994 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:96:6: note: in expansion of macro 'container_of'
96 | container_of(mm_gc, struct xgpio_instance, mmchip);
| ^~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set':
drivers/gpio/gpio-xilinx.c:115:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
115 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_set_multiple':
drivers/gpio/gpio-xilinx.c:147:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
147 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_in':
drivers/gpio/gpio-xilinx.c:187:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
187 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_dir_out':
drivers/gpio/gpio-xilinx.c:218:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
218 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_xlate':
drivers/gpio/gpio-xilinx.c:274:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
274 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-xilinx.c:277:8: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
277 | if (gc->of_gpio_n_cells == 3 && flags)
| ^~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_irq_mask':
drivers/gpio/gpio-xilinx.c:315:12: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744071562067967' to '2147483647' [-Woverflow]
315 | ~XGPIO_GIER_IE);
drivers/gpio/gpio-xilinx.c:50:51: note: in definition of macro 'xgpio_writereg'
50 | # define xgpio_writereg(offset, val) __raw_writel(val, offset)
| ^~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_to_irq':
drivers/gpio/gpio-xilinx.c:392:34: warning: initialization of 'struct of_mm_gpio_chip *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
392 | struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
| ^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c: In function 'xgpio_remove':
drivers/gpio/gpio-xilinx.c:576:2: error: implicit declaration of function 'of_mm_gpiochip_remove'; did you mean 'gpiochip_remove'? [-Werror=implicit-function-declaration]
576 | of_mm_gpiochip_remove(&chip->mmchip);
| ^~~~~~~~~~~~~~~~~~~~~
| gpiochip_remove
drivers/gpio/gpio-xilinx.c: In function 'xgpio_of_probe':
drivers/gpio/gpio-xilinx.c:676:11: error: implicit declaration of function 'of_mm_gpiochip_add'; did you mean 'gpiochip_add'? [-Werror=implicit-function-declaration]
676 | status = of_mm_gpiochip_add(np, &chip->mmchip);
| ^~~~~~~~~~~~~~~~~~
| gpiochip_add
cc1: some warnings being treated as errors
vim +277 drivers/gpio/gpio-xilinx.c
261
262 /**
263 * xgpio_xlate - Translate gpio_spec to the GPIO number and flags
264 * @gc: Pointer to gpio_chip device structure.
265 * @gpiospec: gpio specifier as found in the device tree
266 * @flags: A flags pointer based on binding
267 *
268 * Return:
269 * irq number otherwise -EINVAL
270 */
271 static int xgpio_xlate(struct gpio_chip *gc,
272 const struct of_phandle_args *gpiospec, u32 *flags)
273 {
274 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
275 struct xgpio_instance *chip = container_of(mm_gc, struct xgpio_instance,
276 mmchip);
> 277 if (gc->of_gpio_n_cells == 3 && flags)
278 *flags = gpiospec->args[2];
279
280 if (gpiospec->args[1] == chip->offset)
281 return gpiospec->args[0];
282
283 return -EINVAL;
284 }
285
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 20706 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200812/01730599/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list