* [xlnx:xlnx_rebase_v5.4 1277/1289] drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
@ 2020-05-02 13:24 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-02 13:24 UTC (permalink / raw)
To: Michal Simek; +Cc: kbuild-all, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 7745 bytes --]
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: a43f2284bfbb4d16bc7a16d7bed1ecf813d927e0
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1289] gpio: xilinx: Use xilinx tested gpio driver
config: x86_64-randconfig-d003-20200430 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type
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]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:94:34: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
In file included from arch/x86/include/asm/bitops.h:16:0,
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'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#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'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:96:6: note: in expansion of macro 'container_of'
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 makes pointer from integer without a cast [-Wint-conversion]
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 makes pointer from integer without a cast [-Wint-conversion]
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 makes pointer from integer without a cast [-Wint-conversion]
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 makes pointer from integer without a cast [-Wint-conversion]
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 makes pointer from integer without a cast [-Wint-conversion]
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'
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: large integer implicitly truncated to unsigned type [-Woverflow]
~XGPIO_GIER_IE);
^
drivers/gpio/gpio-xilinx.c:50:51: note: in definition of macro 'xgpio_writereg'
# 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 makes pointer from integer without a cast [-Wint-conversion]
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]
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]
status = of_mm_gpiochip_add(np, &chip->mmchip);
^~~~~~~~~~~~~~~~~~
gpiochip_add
cc1: some warnings being treated as errors
vim +/mmchip +68 drivers/gpio/gpio-xilinx.c
52
53 /**
54 * struct xgpio_instance - Stores information about GPIO device
55 * @mmchip: OF GPIO chip for memory mapped banks
56 * @mmchip_dual: Pointer to the OF dual gpio chip
57 * @gpio_state: GPIO state shadow register
58 * @gpio_dir: GPIO direction shadow register
59 * @offset: GPIO channel offset
60 * @irq_base: GPIO channel irq base address
61 * @irq_enable: GPIO irq enable/disable bitfield
62 * @no_init: No intitialisation at probe
63 * @gpio_lock: Lock used for synchronization
64 * @irq_domain: irq_domain of the controller
65 * @clk: clock resource for this driver
66 */
67 struct xgpio_instance {
> 68 struct of_mm_gpio_chip mmchip;
69 struct of_mm_gpio_chip *mmchip_dual;
70 u32 gpio_state;
71 u32 gpio_dir;
72 u32 offset;
73 int irq_base;
74 u32 irq_enable;
75 bool no_init;
76 spinlock_t gpio_lock;
77 struct irq_domain *irq_domain;
78 struct clk *clk;
79 };
80
81 /**
82 * xgpio_get - Read the specified signal of the GPIO device.
83 * @gc: Pointer to gpio_chip device structure.
84 * @gpio: GPIO signal number.
85 *
86 * This function reads the specified signal of the GPIO device.
87 *
88 * Return:
89 * 0 if direction of GPIO signals is set as input otherwise it
90 * returns negative error value.
91 */
92 static int xgpio_get(struct gpio_chip *gc, unsigned int gpio)
93 {
> 94 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
95 struct xgpio_instance *chip =
96 container_of(mm_gc, struct xgpio_instance, mmchip);
97
98 void __iomem *regs = mm_gc->regs + chip->offset;
99
100 return !!(xgpio_readreg(regs + XGPIO_DATA_OFFSET) & BIT(gpio));
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29600 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-02 13:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 13:24 [xlnx:xlnx_rebase_v5.4 1277/1289] drivers/gpio/gpio-xilinx.c:68:25: error: field 'mmchip' has incomplete type kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).