[gpio:gpiochip-no-driver-h 2/2] drivers/media/dvb-frontends/cxd2820r_priv.h:46:19: error: field has incomplete type 'struct gpio_chip'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: arm-randconfig-r002-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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 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
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/media/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

   In file included from drivers/media/dvb-frontends/cxd2820r_core.c:9:
   In file included from drivers/media/dvb-frontends/cxd2820r_priv.h:16:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
   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));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/media/dvb-frontends/cxd2820r_core.c:9:
>> drivers/media/dvb-frontends/cxd2820r_priv.h:46:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip gpio_chip;
                            ^
   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/media/dvb-frontends/cxd2820r_core.c:424:31: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                        ^
>> drivers/media/dvb-frontends/cxd2820r_core.c:424:24: warning: incompatible integer to pointer conversion initializing 'struct cxd2820r_priv *' with an expression of type 'int' [-Wint-conversion]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/cxd2820r_core.c:438:31: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                        ^
   drivers/media/dvb-frontends/cxd2820r_core.c:438:24: warning: incompatible integer to pointer conversion initializing 'struct cxd2820r_priv *' with an expression of type 'int' [-Wint-conversion]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/cxd2820r_core.c:454:31: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                        ^
   drivers/media/dvb-frontends/cxd2820r_core.c:454:24: warning: incompatible integer to pointer conversion initializing 'struct cxd2820r_priv *' with an expression of type 'int' [-Wint-conversion]
           struct cxd2820r_priv *priv = gpiochip_get_data(chip);
                                 ^      ~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/dvb-frontends/cxd2820r_core.c:660:9: error: implicit declaration of function 'gpiochip_add_data' [-Werror,-Wimplicit-function-declaration]
                   ret = gpiochip_add_data(&priv->gpio_chip, priv);
                         ^
>> drivers/media/dvb-frontends/cxd2820r_core.c:716:3: error: implicit declaration of function 'gpiochip_remove' [-Werror,-Wimplicit-function-declaration]
                   gpiochip_remove(&priv->gpio_chip);
                   ^
   4 warnings and 7 errors generated.
--
   In file included from drivers/media/dvb-frontends/cxd2820r_c.c:9:
   In file included from drivers/media/dvb-frontends/cxd2820r_priv.h:16:
   In file included from include/linux/gpio.h:59:
   In file included from arch/arm/include/asm/gpio.h:10:
   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));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/media/dvb-frontends/cxd2820r_c.c:9:
>> drivers/media/dvb-frontends/cxd2820r_priv.h:46:19: error: field has incomplete type 'struct gpio_chip'
           struct gpio_chip gpio_chip;
                            ^
   include/asm-generic/gpio.h:56:22: note: forward declaration of 'struct gpio_chip'
   static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
                        ^
   1 warning and 2 errors generated.


vim +46 drivers/media/dvb-frontends/cxd2820r_priv.h

fcd09f6592cc1d drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-08  27  
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  28  struct cxd2820r_priv {
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  29  	struct i2c_client *client[2];
43e2ea63eb9781 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-13  30  	struct regmap *regmap[2];
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  31  	struct i2c_adapter *i2c;
14c038627e275f drivers/media/dvb/frontends/cxd2820r_priv.h Manu Abraham          2011-11-24  32  	struct dvb_frontend fe;
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  33  	u8 ts_mode;
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  34  	bool ts_clk_inv;
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  35  	bool if_agc_polarity;
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  36  	bool spec_inv;
07fdf7d9f19fb6 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  37  
4aa4fd86bca576 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-09  38  	u64 post_bit_error_prev_dvbv3;
2832fd3177d7d9 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2016-08-08  39  	u64 post_bit_error;
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  40  
1d44ccb9ea7fc0 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-05-25  41  	bool ber_running;
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  42  
1e8f31f3172614 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2012-07-19  43  #define GPIO_COUNT 3
1e8f31f3172614 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2012-07-19  44  	u8 gpio[GPIO_COUNT];
1e8f31f3172614 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2012-07-19  45  #ifdef CONFIG_GPIOLIB
1e8f31f3172614 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2012-07-19 @46  	struct gpio_chip gpio_chip;
1e8f31f3172614 drivers/media/dvb-frontends/cxd2820r_priv.h Antti Palosaari       2012-07-19  47  #endif
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  48  
0df289a209e02f drivers/media/dvb-frontends/cxd2820r_priv.h Mauro Carvalho Chehab 2015-06-07  49  	enum fe_delivery_system delivery_system;
1d44ccb9ea7fc0 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-05-25  50  	bool last_tune_failed; /* for switch between T and T2 tune */
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  51  };
27cfc85e3dae18 drivers/media/dvb/frontends/cxd2820r_priv.h Antti Palosaari       2011-04-07  52  

:::::: The code at line 46 was first introduced by commit
:::::: 1e8f31f31726148c27de1ff4692c76c9bcff9860 [media] cxd2820r: use Kernel GPIO for GPIO access

:::::: TO: Antti Palosaari <crope@xxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux