[gpio:gpiochip-no-driver-h 1/1] include/linux/ssb/ssb.h:496:19: error: field 'gpio' has incomplete type

[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:   2ade795a7e0399423f07a9b077b820792be52f5c
commit: 2ade795a7e0399423f07a9b077b820792be52f5c [1/1] See what explodes if we apply this patch
config: i386-randconfig-s001-20200702 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-3-gfa153962-dirty
        git checkout 2ade795a7e0399423f07a9b077b820792be52f5c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/gpio.h:62,
                    from include/linux/bcma/bcma_driver_chipcommon.h:6,
                    from include/linux/bcma/bcma.h:9,
                    from drivers/usb/host/bcma-hcd.c:21:
   include/asm-generic/gpio.h: In function 'gpio_to_chip':
   include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration]
      58 |  return gpiod_to_chip(gpio_to_desc(gpio));
         |         ^~~~~~~~~~~~~
         |         gpio_to_chip
   include/asm-generic/gpio.h:58:9: warning: returning 'int' from a function with return type 'struct gpio_chip *' makes pointer from integer without a cast [-Wint-conversion]
      58 |  return gpiod_to_chip(gpio_to_desc(gpio));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bcma/bcma.h:9,
                    from drivers/usb/host/bcma-hcd.c:21:
   include/linux/bcma/bcma_driver_chipcommon.h: At top level:
   include/linux/bcma/bcma_driver_chipcommon.h:647:19: error: field 'gpio' has incomplete type
     647 |  struct gpio_chip gpio;
         |                   ^~~~
   In file included from include/linux/bcma/bcma.h:14,
                    from drivers/usb/host/bcma-hcd.c:21:
>> include/linux/ssb/ssb.h:496:19: error: field 'gpio' has incomplete type
     496 |  struct gpio_chip gpio;
         |                   ^~~~
   In file included from include/linux/of_gpio.h:14,
                    from drivers/usb/host/bcma-hcd.c:28:
   include/linux/gpio/driver.h:744:19: error: conflicting types for 'gpiod_to_chip'
     744 | struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
         |                   ^~~~~~~~~~~~~
   In file included from include/linux/gpio.h:62,
                    from include/linux/bcma/bcma_driver_chipcommon.h:6,
                    from include/linux/bcma/bcma.h:9,
                    from drivers/usb/host/bcma-hcd.c:21:
   include/asm-generic/gpio.h:58:9: note: previous implicit declaration of 'gpiod_to_chip' was here
      58 |  return gpiod_to_chip(gpio_to_desc(gpio));
         |         ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from include/linux/gpio.h:62,
                    from include/linux/ssb/ssb.h:10,
                    from drivers/usb/host/ssb-hcd.c:20:
   include/asm-generic/gpio.h: In function 'gpio_to_chip':
   include/asm-generic/gpio.h:58:9: error: implicit declaration of function 'gpiod_to_chip'; did you mean 'gpio_to_chip'? [-Werror=implicit-function-declaration]
      58 |  return gpiod_to_chip(gpio_to_desc(gpio));
         |         ^~~~~~~~~~~~~
         |         gpio_to_chip
   include/asm-generic/gpio.h:58:9: warning: returning 'int' from a function with return type 'struct gpio_chip *' makes pointer from integer without a cast [-Wint-conversion]
      58 |  return gpiod_to_chip(gpio_to_desc(gpio));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/usb/host/ssb-hcd.c:20:
   include/linux/ssb/ssb.h: At top level:
>> include/linux/ssb/ssb.h:496:19: error: field 'gpio' has incomplete type
     496 |  struct gpio_chip gpio;
         |                   ^~~~
   cc1: some warnings being treated as errors

vim +/gpio +496 include/linux/ssb/ssb.h

61e115a56d1aaf Michael Buesch 2007-09-18  454  
61e115a56d1aaf Michael Buesch 2007-09-18  455  	/* ID information about the Chip. */
61e115a56d1aaf Michael Buesch 2007-09-18  456  	u16 chip_id;
ce57d9e694d98e Rafał Miłecki  2011-04-01  457  	u8 chip_rev;
ea2db495f92ad2 Rafał Miłecki  2010-03-31  458  	u16 sprom_offset;
c272ef4403c271 Larry Finger   2007-11-09  459  	u16 sprom_size;		/* number of words in sprom */
61e115a56d1aaf Michael Buesch 2007-09-18  460  	u8 chip_package;
61e115a56d1aaf Michael Buesch 2007-09-18  461  
61e115a56d1aaf Michael Buesch 2007-09-18  462  	/* List of devices (cores) on the backplane. */
61e115a56d1aaf Michael Buesch 2007-09-18  463  	struct ssb_device devices[SSB_MAX_NR_CORES];
61e115a56d1aaf Michael Buesch 2007-09-18  464  	u8 nr_devices;
61e115a56d1aaf Michael Buesch 2007-09-18  465  
61e115a56d1aaf Michael Buesch 2007-09-18  466  	/* Software ID number for this bus. */
61e115a56d1aaf Michael Buesch 2007-09-18  467  	unsigned int busnumber;
61e115a56d1aaf Michael Buesch 2007-09-18  468  
61e115a56d1aaf Michael Buesch 2007-09-18  469  	/* The ChipCommon device (if available). */
61e115a56d1aaf Michael Buesch 2007-09-18  470  	struct ssb_chipcommon chipco;
61e115a56d1aaf Michael Buesch 2007-09-18  471  	/* The PCI-core device (if available). */
61e115a56d1aaf Michael Buesch 2007-09-18  472  	struct ssb_pcicore pcicore;
61e115a56d1aaf Michael Buesch 2007-09-18  473  	/* The MIPS-core device (if available). */
61e115a56d1aaf Michael Buesch 2007-09-18  474  	struct ssb_mipscore mipscore;
61e115a56d1aaf Michael Buesch 2007-09-18  475  	/* The EXTif-core device (if available). */
61e115a56d1aaf Michael Buesch 2007-09-18  476  	struct ssb_extif extif;
61e115a56d1aaf Michael Buesch 2007-09-18  477  
61e115a56d1aaf Michael Buesch 2007-09-18  478  	/* The following structure elements are not available in early
61e115a56d1aaf Michael Buesch 2007-09-18  479  	 * SSB initialization. Though, they are available for regular
61e115a56d1aaf Michael Buesch 2007-09-18  480  	 * registered drivers at any stage. So be careful when
61e115a56d1aaf Michael Buesch 2007-09-18  481  	 * using them in the ssb core code. */
61e115a56d1aaf Michael Buesch 2007-09-18  482  
61e115a56d1aaf Michael Buesch 2007-09-18  483  	/* ID information about the PCB. */
61e115a56d1aaf Michael Buesch 2007-09-18  484  	struct ssb_boardinfo boardinfo;
61e115a56d1aaf Michael Buesch 2007-09-18  485  	/* Contents of the SPROM. */
61e115a56d1aaf Michael Buesch 2007-09-18  486  	struct ssb_sprom sprom;
7cb4461520f307 Michael Buesch 2008-02-19  487  	/* If the board has a cardbus slot, this is set to true. */
7cb4461520f307 Michael Buesch 2008-02-19  488  	bool has_cardbus_slot;
61e115a56d1aaf Michael Buesch 2007-09-18  489  
53521d8c90d366 Michael Buesch 2008-02-19  490  #ifdef CONFIG_SSB_EMBEDDED
53521d8c90d366 Michael Buesch 2008-02-19  491  	/* Lock for GPIO register access. */
53521d8c90d366 Michael Buesch 2008-02-19  492  	spinlock_t gpio_lock;
bde327eff8a722 Hauke Mehrtens 2012-12-05  493  	struct platform_device *watchdog;
53521d8c90d366 Michael Buesch 2008-02-19  494  #endif /* EMBEDDED */
ec43b08b573349 Hauke Mehrtens 2012-11-20  495  #ifdef CONFIG_SSB_DRIVER_GPIO
ec43b08b573349 Hauke Mehrtens 2012-11-20 @496  	struct gpio_chip gpio;
7c1bc0da3206de Rafał Miłecki  2014-01-13  497  	struct irq_domain *irq_domain;
ec43b08b573349 Hauke Mehrtens 2012-11-20  498  #endif /* DRIVER_GPIO */
53521d8c90d366 Michael Buesch 2008-02-19  499  
61e115a56d1aaf Michael Buesch 2007-09-18  500  	/* Internal-only stuff follows. Do not touch. */
61e115a56d1aaf Michael Buesch 2007-09-18  501  	struct list_head list;
61e115a56d1aaf Michael Buesch 2007-09-18  502  	/* Is the bus already powered up? */
61e115a56d1aaf Michael Buesch 2007-09-18  503  	bool powered_up;
61e115a56d1aaf Michael Buesch 2007-09-18  504  	int power_warn_count;
61e115a56d1aaf Michael Buesch 2007-09-18  505  };
61e115a56d1aaf Michael Buesch 2007-09-18  506  

:::::: The code at line 496 was first introduced by commit
:::::: ec43b08b5733494ad88aa618ecdf534320dd8207 ssb: add GPIO driver

:::::: TO: Hauke Mehrtens <hauke@xxxxxxxxxx>
:::::: CC: John Crispin <blogic@xxxxxxxxxxx>

---
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