[gpio:gpio-descriptors-wdt 2/2] arch/mips/alchemy/board-mtx1.c:146:30: error: 'mtx1_wdt_res' undeclared here (not in a function); did you mean 'mtx1_wdt'?

[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 gpio-descriptors-wdt
head:   8b05aac75351729e8b142dbbe7b37e1d66afa049
commit: 8b05aac75351729e8b142dbbe7b37e1d66afa049 [2/2] watchdog: mtx-1: Convert to use GPIO descriptor
config: mips-mtx1_defconfig (attached as .config)
compiler: mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.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 8b05aac75351729e8b142dbbe7b37e1d66afa049
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=mips 

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

   drivers//watchdog/mtx-1_wdt.c: In function 'mtx1_wdt_start':
>> drivers//watchdog/mtx-1_wdt.c:93:35: error: 'struct <anonymous>' has no member named 'gpio'; did you mean 'gpiod'?
      gpiod_set_value(mtx1_wdt_device.gpio, 1);
                                      ^~~~
                                      gpiod
   drivers//watchdog/mtx-1_wdt.c: In function 'mtx1_wdt_stop':
   drivers//watchdog/mtx-1_wdt.c:108:35: error: 'struct <anonymous>' has no member named 'gpio'; did you mean 'gpiod'?
      gpiod_set_value(mtx1_wdt_device.gpio, 0);
                                      ^~~~
                                      gpiod
--
   In file included from include/linux/interrupt.h:6:0,
                    from arch/mips/alchemy/board-mtx1.c:22:
>> arch/mips/alchemy/board-mtx1.c:146:30: error: 'mtx1_wdt_res' undeclared here (not in a function); did you mean 'mtx1_wdt'?
     .num_resources = ARRAY_SIZE(mtx1_wdt_res),
                                 ^
   include/linux/kernel.h:72:33: note: in definition of macro 'ARRAY_SIZE'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                    ^~~
   In file included from include/linux/kernel.h:15:0,
                    from include/linux/interrupt.h:6,
                    from arch/mips/alchemy/board-mtx1.c:22:
>> include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
    #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                                ^
   include/linux/compiler.h:379:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
    #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                               ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:72:59: note: in expansion of macro '__must_be_array'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                              ^~~~~~~~~~~~~~~
>> arch/mips/alchemy/board-mtx1.c:146:19: note: in expansion of macro 'ARRAY_SIZE'
     .num_resources = ARRAY_SIZE(mtx1_wdt_res),
                      ^~~~~~~~~~
--
   In file included from include/linux/interrupt.h:6:0,
                    from arch/mips//alchemy/board-mtx1.c:22:
   arch/mips//alchemy/board-mtx1.c:146:30: error: 'mtx1_wdt_res' undeclared here (not in a function); did you mean 'mtx1_wdt'?
     .num_resources = ARRAY_SIZE(mtx1_wdt_res),
                                 ^
   include/linux/kernel.h:72:33: note: in definition of macro 'ARRAY_SIZE'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                    ^~~
   In file included from include/linux/kernel.h:15:0,
                    from include/linux/interrupt.h:6,
                    from arch/mips//alchemy/board-mtx1.c:22:
>> include/linux/build_bug.h:29:45: error: bit-field '<anonymous>' width not an integer constant
    #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:(-!!(e)); }))
                                                ^
   include/linux/compiler.h:379:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
    #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
                               ^~~~~~~~~~~~~~~~~
   include/linux/kernel.h:72:59: note: in expansion of macro '__must_be_array'
    #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                                              ^~~~~~~~~~~~~~~
   arch/mips//alchemy/board-mtx1.c:146:19: note: in expansion of macro 'ARRAY_SIZE'
     .num_resources = ARRAY_SIZE(mtx1_wdt_res),
                      ^~~~~~~~~~

vim +146 arch/mips/alchemy/board-mtx1.c

8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  @22  #include <linux/interrupt.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   23  #include <linux/kernel.h>
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23   24  #include <linux/platform_device.h>
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23   25  #include <linux/leds.h>
1ff1a78cb arch/mips/au1000/mtx-1/platform.c  Sergei Shtylyov    2008-04-30   26  #include <linux/gpio.h>
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02   27  #include <linux/gpio/machine.h>
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07   28  #include <linux/gpio_keys.h>
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07   29  #include <linux/input.h>
952835630 arch/mips/au1000/mtx-1/platform.c  Yoichi Yuasa       2008-07-11   30  #include <linux/mtd/partitions.h>
952835630 arch/mips/au1000/mtx-1/platform.c  Yoichi Yuasa       2008-07-11   31  #include <linux/mtd/physmap.h>
952835630 arch/mips/au1000/mtx-1/platform.c  Yoichi Yuasa       2008-07-11   32  #include <mtd/mtd-abi.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   33  #include <asm/bootinfo.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   34  #include <asm/reboot.h>
5c93316c8 arch/mips/alchemy/board-mtx1.c     Alexander Sverdlin 2018-07-13   35  #include <asm/setup.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   36  #include <asm/mach-au1x00/au1000.h>
832f5dacf arch/mips/alchemy/board-mtx1.c     Alban Bedel        2015-08-02   37  #include <asm/mach-au1x00/gpio-au1000.h>
bf3a1eb85 arch/mips/alchemy/mtx-1/platform.c Florian Fainelli   2011-02-27   38  #include <asm/mach-au1x00/au1xxx_eth.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   39  #include <prom.h>
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   40  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   41  const char *get_system_type(void)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   42  {
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   43  	return "MTX-1";
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   44  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   45  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   46  void __init prom_init(void)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   47  {
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   48  	unsigned char *memsize_str;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   49  	unsigned long memsize;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   50  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   51  	prom_argc = fw_arg0;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   52  	prom_argv = (char **)fw_arg1;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   53  	prom_envp = (char **)fw_arg2;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   54  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   55  	prom_init_cmdline();
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   56  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   57  	memsize_str = prom_getenv("memsize");
d334c2b9d arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2014-02-20   58  	if (!memsize_str || kstrtoul(memsize_str, 0, &memsize))
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   59  		memsize = 0x04000000;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   60  	add_memory_region(0, memsize, BOOT_MEM_RAM);
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   61  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   62  
5c93316c8 arch/mips/alchemy/board-mtx1.c     Alexander Sverdlin 2018-07-13   63  void prom_putchar(char c)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   64  {
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   65  	alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   66  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   67  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   68  static void mtx1_reset(char *c)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   69  {
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   70  	/* Jump to the reset vector */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   71  	__asm__ __volatile__("jr\t%0" : : "r"(0xbfc00000));
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   72  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   73  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   74  static void mtx1_power_off(void)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   75  {
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   76  	while (1)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   77  		asm volatile (
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   78  		"	.set	mips32					\n"
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   79  		"	wait						\n"
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   80  		"	.set	mips0					\n");
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   81  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   82  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   83  void __init board_setup(void)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   84  {
4bd5a5740 arch/mips/alchemy/board-mtx1.c     Florian Fainelli   2012-01-31   85  #if IS_ENABLED(CONFIG_USB_OHCI_HCD)
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   86  	/* Enable USB power switch */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   87  	alchemy_gpio_direction_output(204, 0);
4bd5a5740 arch/mips/alchemy/board-mtx1.c     Florian Fainelli   2012-01-31   88  #endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   89  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   90  	/* Initialize sys_pinfunc */
1d09de7dc arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2014-07-23   91  	alchemy_wrsys(SYS_PF_NI2, AU1000_SYS_PINFUNC);
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   92  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   93  	/* Initialize GPIO */
1d09de7dc arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2014-07-23   94  	alchemy_wrsys(~0, AU1000_SYS_TRIOUTCLR);
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   95  	alchemy_gpio_direction_output(0, 0);	/* Disable M66EN (PCI 66MHz) */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   96  	alchemy_gpio_direction_output(3, 1);	/* Disable PCI CLKRUN# */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   97  	alchemy_gpio_direction_output(1, 1);	/* Enable EXT_IO3 */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   98  	alchemy_gpio_direction_output(5, 0);	/* Disable eth PHY TX_ER */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10   99  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  100  	/* Enable LED and set it to green */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  101  	alchemy_gpio_direction_output(211, 1);	/* green on */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  102  	alchemy_gpio_direction_output(212, 0);	/* red off */
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  103  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  104  	pm_power_off = mtx1_power_off;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  105  	_machine_halt = mtx1_power_off;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  106  	_machine_restart = mtx1_reset;
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  107  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  108  	printk(KERN_INFO "4G Systems MTX-1 Board\n");
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  109  }
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  110  
8e026910f arch/mips/alchemy/board-mtx1.c     Manuel Lauss       2011-11-10  111  /******************************************************************************/
bf3a1eb85 arch/mips/alchemy/mtx-1/platform.c Florian Fainelli   2011-02-27  112  
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  113  static struct gpio_keys_button mtx1_gpio_button[] = {
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  114  	{
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  115  		.gpio = 207,
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  116  		.code = BTN_0,
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  117  		.desc = "System button",
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  118  	}
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  119  };
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  120  
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  121  static struct gpio_keys_platform_data mtx1_buttons_data = {
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  122  	.buttons = mtx1_gpio_button,
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  123  	.nbuttons = ARRAY_SIZE(mtx1_gpio_button),
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  124  };
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  125  
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  126  static struct platform_device mtx1_button = {
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  127  	.name = "gpio-keys",
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  128  	.id = -1,
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  129  	.dev = {
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  130  		.platform_data = &mtx1_buttons_data,
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  131  	}
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  132  };
f6ed10ab9 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2008-01-07  133  
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  134  static struct gpiod_lookup_table mtx1_wdt_gpio_table = {
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  135  	.dev_id = "mtx1-wdt.0",
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  136  	.table = {
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  137  		/* Global number 215 is offset 15 on Alchemy GPIO 2 */
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  138  		GPIO_LOOKUP("alchemy-gpio2", 15, NULL, GPIO_ACTIVE_HIGH),
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  139  		{ },
8b05aac75 arch/mips/alchemy/board-mtx1.c     Linus Walleij      2018-12-02  140  	},
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  141  };
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  142  
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  143  static struct platform_device mtx1_wdt = {
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  144  	.name = "mtx1-wdt",
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  145  	.id = 0,
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23 @146  	.num_resources = ARRAY_SIZE(mtx1_wdt_res),
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  147  	.resource = mtx1_wdt_res,
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  148  };
26c288f82 arch/mips/au1000/mtx-1/platform.c  Florian Fainelli   2007-10-23  149  

:::::: The code at line 146 was first introduced by commit
:::::: 26c288f82c74dba08da6321c626c101a7aa8575b [MIPS] Alchemy: Register platform devices

:::::: TO: Florian Fainelli <florian.fainelli@xxxxxxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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