[pinctrl:devel 19/26] arch/blackfin/kernel/bfin_gpio.c:105:13: error: 'MAX_RESOURCES' undeclared here (not in a function)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head:   f4cd0d7b0b1e844124905e5323ac7f113a230382
commit: d219b924611a5cceb17cc6b9a8dd103ab9668c94 [19/26] pinctrl: change Kconfig PINCTRL variable to a menuconfig
config: blackfin-allmodconfig (attached as .config)
compiler: bfin-uclinux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout d219b924611a5cceb17cc6b9a8dd103ab9668c94
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

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

>> arch/blackfin/kernel/bfin_gpio.c:105:13: error: 'MAX_RESOURCES' undeclared here (not in a function)
    } str_ident[MAX_RESOURCES];
                ^~~~~~~~~~~~~
>> arch/blackfin/kernel/bfin_gpio.c:108:27: error: array type has incomplete element type 'struct gpio_port_s'
    static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM];
                              ^~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'set_gpio_dir':
>> arch/blackfin/kernel/bfin_gpio.c:361:30: error: dereferencing pointer to incomplete type 'struct gpio_port_t'
      gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
                                 ^
>> arch/blackfin/kernel/bfin_gpio.c:369:1: note: in expansion of macro 'SET_GPIO'
    SET_GPIO(dir)   /* set_gpio_dir() */
    ^~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'bfin_gpio_pm_standby_ctrl':
>> arch/blackfin/kernel/bfin_gpio.c:556:4: error: implicit declaration of function 'bfin_internal_set_wake' [-Werror=implicit-function-declaration]
       bfin_internal_set_wake(sic_iwr_irqs[bank], ctrl);
       ^~~~~~~~~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'peripheral_request':
>> arch/blackfin/kernel/bfin_gpio.c:658:25: error: implicit declaration of function 'P_IDENT' [-Werror=implicit-function-declaration]
     unsigned short ident = P_IDENT(per);
                            ^~~~~~~
>> arch/blackfin/kernel/bfin_gpio.c:664:12: error: 'P_DONTCARE' undeclared (first use in this function)
     if (per & P_DONTCARE)
               ^~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:664:12: note: each undeclared identifier is reported only once for each function it appears in
>> arch/blackfin/kernel/bfin_gpio.c:667:14: error: 'P_DEFINED' undeclared (first use in this function)
     if (!(per & P_DEFINED))
                 ^~~~~~~~~
>> arch/blackfin/kernel/bfin_gpio.c:694:15: error: 'P_MAYSHARE' undeclared (first use in this function)
      if (!(per & P_MAYSHARE)) {
                  ^~~~~~~~~~
>> arch/blackfin/kernel/bfin_gpio.c:707:28: error: implicit declaration of function 'P_FUNCT2MUX' [-Werror=implicit-function-declaration]
              __func__, ident, P_FUNCT2MUX(per), get_label(ident));
                               ^~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'peripheral_request_list':
>> arch/blackfin/kernel/bfin_gpio.c:741:5: error: implicit declaration of function 'peripheral_free' [-Werror=implicit-function-declaration]
        peripheral_free(per[cnt - 1]);
        ^~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: At top level:
>> arch/blackfin/kernel/bfin_gpio.c:751:6: warning: conflicting types for 'peripheral_free'
    void peripheral_free(unsigned short per)
         ^~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:741:5: note: previous implicit declaration of 'peripheral_free' was here
        peripheral_free(per[cnt - 1]);
        ^~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'peripheral_free':
   arch/blackfin/kernel/bfin_gpio.c:756:12: error: 'P_DONTCARE' undeclared (first use in this function)
     if (per & P_DONTCARE)
               ^~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:759:14: error: 'P_DEFINED' undeclared (first use in this function)
     if (!(per & P_DEFINED))
                 ^~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:769:14: error: 'P_MAYSHARE' undeclared (first use in this function)
     if (!(per & P_MAYSHARE))
                 ^~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c: In function 'get_label':
>> arch/blackfin/kernel/bfin_gpio.c:131:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   arch/blackfin/kernel/bfin_gpio.c: In function 'cmp_label':
   arch/blackfin/kernel/bfin_gpio.c:144:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   At top level:
   arch/blackfin/kernel/bfin_gpio.c:150:58: warning: 'reserved_peri_map' defined but not used [-Wunused-variable]
    #define DECLARE_RESERVED_MAP(m, c) static unsigned short reserved_##m##_map[c]
                                                             ^
>> arch/blackfin/kernel/bfin_gpio.c:153:1: note: in expansion of macro 'DECLARE_RESERVED_MAP'
    DECLARE_RESERVED_MAP(peri, DIV_ROUND_UP(MAX_RESOURCES, GPIO_BANKSIZE));
    ^~~~~~~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:108:27: warning: 'gpio_bank_saved' defined but not used [-Wunused-variable]
    static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM];
                              ^~~~~~~~~~~~~~~
   arch/blackfin/kernel/bfin_gpio.c:105:3: warning: 'str_ident' defined but not used [-Wunused-variable]
    } str_ident[MAX_RESOURCES];
      ^~~~~~~~~
   cc1: some warnings being treated as errors
--
   arch/blackfin/kernel/debug-mmrs.c: In function 'bfin_debug_mmrs_port':
>> arch/blackfin/kernel/debug-mmrs.c:43:29: error: storage size of 'r' isn't known
      struct bfin_##peri##_regs r; \
                                ^
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:371:2: note: in expansion of macro '__PORT'
     __PORT(CLEAR, data_clear);
     ^~~~~~
   In file included from include/linux/compiler.h:58:0,
                    from include/linux/linkage.h:4,
                    from include/linux/fs.h:4,
                    from include/linux/debugfs.h:18,
                    from arch/blackfin/kernel/debug-mmrs.c:9:
>> arch/blackfin/kernel/debug-mmrs.c:354:24: error: invalid use of undefined type 'struct gpio_port_t'
    #define bfin_gpio_regs gpio_port_t
                           ^
   include/linux/compiler-gcc.h:165:21: note: in definition of macro '__compiler_offsetof'
     __builtin_offsetof(a, b)
                        ^
>> arch/blackfin/kernel/debug-mmrs.c:40:29: note: in expansion of macro 'offsetof'
    #define REGS_OFF(peri, mmr) offsetof(struct bfin_##peri##_regs, mmr)
                                ^~~~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:40:45: note: in expansion of macro 'bfin_gpio_regs'
    #define REGS_OFF(peri, mmr) offsetof(struct bfin_##peri##_regs, mmr)
                                                ^~~~~
>> arch/blackfin/kernel/debug-mmrs.c:44:32: note: in expansion of macro 'REGS_OFF'
      void *addr = (void *)(base + REGS_OFF(peri, rname)); \
                                   ^~~~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:371:2: note: in expansion of macro '__PORT'
     __PORT(CLEAR, data_clear);
     ^~~~~~
   arch/blackfin/kernel/debug-mmrs.c:43:29: warning: unused variable 'r' [-Wunused-variable]
      struct bfin_##peri##_regs r; \
                                ^
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:371:2: note: in expansion of macro '__PORT'
     __PORT(CLEAR, data_clear);
     ^~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:43:29: error: storage size of 'r' isn't known
      struct bfin_##peri##_regs r; \
                                ^
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
   arch/blackfin/kernel/debug-mmrs.c:372:2: note: in expansion of macro '__PORT'
     __PORT(SET, data_set);
     ^~~~~~
   In file included from include/linux/compiler.h:58:0,
                    from include/linux/linkage.h:4,
                    from include/linux/fs.h:4,
                    from include/linux/debugfs.h:18,
                    from arch/blackfin/kernel/debug-mmrs.c:9:
>> arch/blackfin/kernel/debug-mmrs.c:354:24: error: invalid use of undefined type 'struct gpio_port_t'
    #define bfin_gpio_regs gpio_port_t
                           ^
   include/linux/compiler-gcc.h:165:21: note: in definition of macro '__compiler_offsetof'
     __builtin_offsetof(a, b)
                        ^
>> arch/blackfin/kernel/debug-mmrs.c:40:29: note: in expansion of macro 'offsetof'
    #define REGS_OFF(peri, mmr) offsetof(struct bfin_##peri##_regs, mmr)
                                ^~~~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:40:45: note: in expansion of macro 'bfin_gpio_regs'
    #define REGS_OFF(peri, mmr) offsetof(struct bfin_##peri##_regs, mmr)
                                                ^~~~~
>> arch/blackfin/kernel/debug-mmrs.c:44:32: note: in expansion of macro 'REGS_OFF'
      void *addr = (void *)(base + REGS_OFF(peri, rname)); \
                                   ^~~~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
   arch/blackfin/kernel/debug-mmrs.c:372:2: note: in expansion of macro '__PORT'
     __PORT(SET, data_set);
     ^~~~~~
   arch/blackfin/kernel/debug-mmrs.c:43:29: warning: unused variable 'r' [-Wunused-variable]
      struct bfin_##peri##_regs r; \
                                ^
>> arch/blackfin/kernel/debug-mmrs.c:355:30: note: in expansion of macro '__REGS'
    #define __PORT(uname, lname) __REGS(gpio, #uname, lname)
                                 ^~~~~~
   arch/blackfin/kernel/debug-mmrs.c:372:2: note: in expansion of macro '__PORT'
     __PORT(SET, data_set);
     ^~~~~~
>> arch/blackfin/kernel/debug-mmrs.c:43:29: error: storage size of 'r' isn't known
      struct bfin_##peri##_regs r; \
                                ^
--
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_ack_irq':
>> arch/blackfin/mach-common/ints-priority.c:706:2: error: implicit declaration of function 'set_gpio_data' [-Werror=implicit-function-declaration]
     set_gpio_data(irq_to_gpio(d->irq), 0);
     ^~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:706:16: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
     set_gpio_data(irq_to_gpio(d->irq), 0);
                   ^~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_mask_ack_irq':
>> arch/blackfin/mach-common/ints-priority.c:717:2: error: implicit declaration of function 'set_gpio_maska' [-Werror=implicit-function-declaration]
     set_gpio_maska(gpionr, 0);
     ^~~~~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_irq_startup':
>> arch/blackfin/mach-common/ints-priority.c:735:3: error: implicit declaration of function 'bfin_gpio_irq_prepare' [-Werror=implicit-function-declaration]
      bfin_gpio_irq_prepare(gpionr);
      ^~~~~~~~~~~~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_irq_shutdown':
>> arch/blackfin/mach-common/ints-priority.c:748:2: error: implicit declaration of function 'bfin_gpio_irq_free' [-Werror=implicit-function-declaration]
     bfin_gpio_irq_free(gpionr);
     ^~~~~~~~~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_irq_type':
>> arch/blackfin/mach-common/ints-priority.c:769:9: error: implicit declaration of function 'bfin_gpio_irq_request' [-Werror=implicit-function-declaration]
      ret = bfin_gpio_irq_request(gpionr, buf);
            ^~~~~~~~~~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:781:2: error: implicit declaration of function 'set_gpio_inen' [-Werror=implicit-function-declaration]
     set_gpio_inen(gpionr, 0);
     ^~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:782:2: error: implicit declaration of function 'set_gpio_dir' [-Werror=implicit-function-declaration]
     set_gpio_dir(gpionr, 0);
     ^~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:786:3: error: implicit declaration of function 'set_gpio_both' [-Werror=implicit-function-declaration]
      set_gpio_both(gpionr, 1);
      ^~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:791:3: error: implicit declaration of function 'set_gpio_polar' [-Werror=implicit-function-declaration]
      set_gpio_polar(gpionr, 1); /* low or falling edge denoted by one */
      ^~~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:796:3: error: implicit declaration of function 'set_gpio_edge' [-Werror=implicit-function-declaration]
      set_gpio_edge(gpionr, 1);
      ^~~~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_demux_gpio_block':
>> arch/blackfin/mach-common/ints-priority.c:818:9: error: implicit declaration of function 'get_gpiop_data' [-Werror=implicit-function-declaration]
     mask = get_gpiop_data(gpio) & get_gpiop_maska(gpio);
            ^~~~~~~~~~~~~~
>> arch/blackfin/mach-common/ints-priority.c:818:32: error: implicit declaration of function 'get_gpiop_maska' [-Werror=implicit-function-declaration]
     mask = get_gpiop_data(gpio) & get_gpiop_maska(gpio);
                                   ^~~~~~~~~~~~~~~
   arch/blackfin/mach-common/ints-priority.c: In function 'bfin_gpio_set_wake':
>> arch/blackfin/mach-common/ints-priority.c:883:9: error: implicit declaration of function 'bfin_gpio_pm_wakeup_ctrl' [-Werror=implicit-function-declaration]
     return bfin_gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state);
            ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   arch/blackfin/mach-common/pm.c: In function 'bfin_pm_suspend_standby_enter':
>> arch/blackfin/mach-common/pm.c:32:2: error: implicit declaration of function 'bfin_pm_standby_setup' [-Werror=implicit-function-declaration]
     bfin_pm_standby_setup();
     ^~~~~~~~~~~~~~~~~~~~~
>> arch/blackfin/mach-common/pm.c:46:2: error: implicit declaration of function 'bfin_pm_standby_restore' [-Werror=implicit-function-declaration]
     bfin_pm_standby_restore();
     ^~~~~~~~~~~~~~~~~~~~~~~
   arch/blackfin/mach-common/pm.c: In function 'bfin_pm_suspend_mem_enter':
>> arch/blackfin/mach-common/pm.c:179:2: error: implicit declaration of function 'bfin_gpio_pm_hibernate_suspend' [-Werror=implicit-function-declaration]
     bfin_gpio_pm_hibernate_suspend();
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/blackfin/mach-common/pm.c:202:2: error: implicit declaration of function 'bfin_gpio_pm_hibernate_restore' [-Werror=implicit-function-declaration]
     bfin_gpio_pm_hibernate_restore();
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/MAX_RESOURCES +105 arch/blackfin/kernel/bfin_gpio.c

1394f032 Bryan Wu          2007-05-06  102  
fac3cf43 Michael Hennerich 2007-12-24  103  static struct str_ident {
8c613623 Michael Hennerich 2007-08-03  104  	char name[RESOURCE_LABEL_SIZE];
fac3cf43 Michael Hennerich 2007-12-24 @105  } str_ident[MAX_RESOURCES];
8c613623 Michael Hennerich 2007-08-03  106  
1efc80b5 Michael Hennerich 2008-07-19  107  #if defined(CONFIG_PM)
397861cd Bryan Wu          2008-11-18 @108  static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM];
9466a051 Mike Frysinger    2011-06-27  109  # ifdef BF538_FAMILY
9466a051 Mike Frysinger    2011-06-27  110  static unsigned short port_fer_saved[3];
9466a051 Mike Frysinger    2011-06-27  111  # endif
1394f032 Bryan Wu          2007-05-06  112  #endif
1394f032 Bryan Wu          2007-05-06  113  
74c04503 Mike Frysinger    2008-10-08  114  static void gpio_error(unsigned gpio)
acbcd263 Michael Hennerich 2008-01-22  115  {
acbcd263 Michael Hennerich 2008-01-22  116  	printk(KERN_ERR "bfin-gpio: GPIO %d wasn't requested!\n", gpio);
acbcd263 Michael Hennerich 2008-01-22  117  }
acbcd263 Michael Hennerich 2008-01-22  118  
c58c2140 Michael Hennerich 2007-10-04  119  static void set_label(unsigned short ident, const char *label)
c58c2140 Michael Hennerich 2007-10-04  120  {
e9fae189 Michael Hennerich 2008-10-13  121  	if (label) {
8c613623 Michael Hennerich 2007-08-03  122  		strncpy(str_ident[ident].name, label,
c58c2140 Michael Hennerich 2007-10-04  123  			 RESOURCE_LABEL_SIZE);
8c613623 Michael Hennerich 2007-08-03  124  		str_ident[ident].name[RESOURCE_LABEL_SIZE - 1] = 0;
c58c2140 Michael Hennerich 2007-10-04  125  	}
c58c2140 Michael Hennerich 2007-10-04  126  }
c58c2140 Michael Hennerich 2007-10-04  127  
c58c2140 Michael Hennerich 2007-10-04  128  static char *get_label(unsigned short ident)
c58c2140 Michael Hennerich 2007-10-04  129  {
8c613623 Michael Hennerich 2007-08-03  130  	return (*str_ident[ident].name ? str_ident[ident].name : "UNKNOWN");
c58c2140 Michael Hennerich 2007-10-04 @131  }
c58c2140 Michael Hennerich 2007-10-04  132  
c58c2140 Michael Hennerich 2007-10-04  133  static int cmp_label(unsigned short ident, const char *label)
c58c2140 Michael Hennerich 2007-10-04  134  {
fac3cf43 Michael Hennerich 2007-12-24  135  	if (label == NULL) {
fac3cf43 Michael Hennerich 2007-12-24  136  		dump_stack();
fac3cf43 Michael Hennerich 2007-12-24  137  		printk(KERN_ERR "Please provide none-null label\n");
fac3cf43 Michael Hennerich 2007-12-24  138  	}
fac3cf43 Michael Hennerich 2007-12-24  139  
e9fae189 Michael Hennerich 2008-10-13  140  	if (label)
1f7d373f Mike Frysinger    2008-10-28  141  		return strcmp(str_ident[ident].name, label);
c58c2140 Michael Hennerich 2007-10-04  142  	else
c58c2140 Michael Hennerich 2007-10-04  143  		return -EINVAL;
c58c2140 Michael Hennerich 2007-10-04 @144  }
c58c2140 Michael Hennerich 2007-10-04  145  
332824b8 Mike Frysinger    2010-06-02  146  #define map_entry(m, i)      reserved_##m##_map[gpio_bank(i)]
332824b8 Mike Frysinger    2010-06-02  147  #define is_reserved(m, i, e) (map_entry(m, i) & gpio_bit(i))
332824b8 Mike Frysinger    2010-06-02  148  #define reserve(m, i)        (map_entry(m, i) |= gpio_bit(i))
332824b8 Mike Frysinger    2010-06-02  149  #define unreserve(m, i)      (map_entry(m, i) &= ~gpio_bit(i))
332824b8 Mike Frysinger    2010-06-02  150  #define DECLARE_RESERVED_MAP(m, c) static unsigned short reserved_##m##_map[c]
332824b8 Mike Frysinger    2010-06-02  151  
332824b8 Mike Frysinger    2010-06-02  152  DECLARE_RESERVED_MAP(gpio, GPIO_BANK_NUM);
382dbe5b Michael Hennerich 2010-07-13 @153  DECLARE_RESERVED_MAP(peri, DIV_ROUND_UP(MAX_RESOURCES, GPIO_BANKSIZE));
332824b8 Mike Frysinger    2010-06-02  154  DECLARE_RESERVED_MAP(gpio_irq, GPIO_BANK_NUM);
332824b8 Mike Frysinger    2010-06-02  155  

:::::: The code at line 105 was first introduced by commit
:::::: fac3cf432ef9b6bfd64b35b95afe0b7e0079da74 [Blackfin] arch: Fix gpio label handling

:::::: TO: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
:::::: CC: Bryan Wu <bryan.wu@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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