[xlnx:xlnx_rebase_v5.4 1277/1755] drivers/gpio/gpio-xilinx.c:68:25: error: field has incomplete type 'struct of_mm_gpio_chip'
kernel test robot
lkp at intel.com
Wed Apr 28 15:54:12 BST 2021
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 77883b257c27f47445381c70c9236ade8f87eeaa
commit: af0c19b6f15388c554317280433100fd9f3d7d0a [1277/1755] gpio: xilinx: Use xilinx tested gpio driver
config: x86_64-randconfig-a004-20210428 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 87fc97169e7901dfe56ca0da0d92da0c02d2ef48)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/af0c19b6f15388c554317280433100fd9f3d7d0a
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout af0c19b6f15388c554317280433100fd9f3d7d0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-xilinx.c:68:25: error: field has incomplete type 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
>> drivers/gpio/gpio-xilinx.c:94:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
>> drivers/gpio/gpio-xilinx.c:94:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-xilinx.c:98:28: error: incomplete definition of type 'struct of_mm_gpio_chip'
void __iomem *regs = mm_gc->regs + chip->offset;
~~~~~^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:115:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
drivers/gpio/gpio-xilinx.c:115:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:118:28: error: incomplete definition of type 'struct of_mm_gpio_chip'
void __iomem *regs = mm_gc->regs;
~~~~~^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:147:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
drivers/gpio/gpio-xilinx.c:147:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:150:28: error: incomplete definition of type 'struct of_mm_gpio_chip'
void __iomem *regs = mm_gc->regs;
~~~~~^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:187:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
drivers/gpio/gpio-xilinx.c:187:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:190:28: error: incomplete definition of type 'struct of_mm_gpio_chip'
void __iomem *regs = mm_gc->regs;
~~~~~^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:218:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
drivers/gpio/gpio-xilinx.c:218:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-xilinx.c:221:28: error: incomplete definition of type 'struct of_mm_gpio_chip'
void __iomem *regs = mm_gc->regs;
~~~~~^
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:251:41: error: incomplete definition of type 'struct of_mm_gpio_chip'
chip->gpio_state = xgpio_readreg(mm_gc->regs +
~~~~~^
drivers/gpio/gpio-xilinx.c:49:45: note: expanded from macro 'xgpio_readreg'
# define xgpio_readreg(offset) __raw_readl(offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:253:39: error: incomplete definition of type 'struct of_mm_gpio_chip'
chip->gpio_dir = xgpio_readreg(mm_gc->regs + XGPIO_TRI_OFFSET);
~~~~~^
drivers/gpio/gpio-xilinx.c:49:45: note: expanded from macro 'xgpio_readreg'
# define xgpio_readreg(offset) __raw_readl(offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:255:23: error: incomplete definition of type 'struct of_mm_gpio_chip'
xgpio_writereg(mm_gc->regs + chip->offset + XGPIO_DATA_OFFSET,
~~~~~^
drivers/gpio/gpio-xilinx.c:50:56: note: expanded from macro 'xgpio_writereg'
# define xgpio_writereg(offset, val) __raw_writel(val, offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:257:23: error: incomplete definition of type 'struct of_mm_gpio_chip'
xgpio_writereg(mm_gc->regs + chip->offset + XGPIO_TRI_OFFSET,
~~~~~^
drivers/gpio/gpio-xilinx.c:50:56: note: expanded from macro 'xgpio_writereg'
# define xgpio_writereg(offset, val) __raw_writel(val, offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:274:34: error: implicit declaration of function 'to_of_mm_gpio_chip' [-Werror,-Wimplicit-function-declaration]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^
drivers/gpio/gpio-xilinx.c:274:26: warning: incompatible integer to pointer conversion initializing 'struct of_mm_gpio_chip *' with an expression of type 'int' [-Wint-conversion]
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
^ ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpio-xilinx.c:277:10: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip'
if (gc->of_gpio_n_cells == 3 && flags)
~~ ^
drivers/gpio/gpio-xilinx.c:307:29: error: incomplete definition of type 'struct of_mm_gpio_chip'
temp = xgpio_readreg(mm_gc->regs + XGPIO_IPIER_OFFSET);
~~~~~^
drivers/gpio/gpio-xilinx.c:49:45: note: expanded from macro 'xgpio_readreg'
# define xgpio_readreg(offset) __raw_readl(offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
drivers/gpio/gpio-xilinx.c:309:23: error: incomplete definition of type 'struct of_mm_gpio_chip'
xgpio_writereg(mm_gc->regs + XGPIO_IPIER_OFFSET, temp);
~~~~~^
drivers/gpio/gpio-xilinx.c:50:56: note: expanded from macro 'xgpio_writereg'
# define xgpio_writereg(offset, val) __raw_writel(val, offset)
^~~~~~
drivers/gpio/gpio-xilinx.c:68:9: note: forward declaration of 'struct of_mm_gpio_chip'
struct of_mm_gpio_chip mmchip;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
vim +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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29541 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210428/668ef798/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list