[gpio:devel-hierarchical 12/12] drivers/gpio/gpio-ixp4xx.c:235:17: error: 'ixp4xx_gpio_to_irq' undeclared; did you mean 'ixp4xx_init_irq'?

[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 devel-hierarchical
head:   d545933b2ffdbd4ad98d45e899faf61180d3ffa7
commit: d545933b2ffdbd4ad98d45e899faf61180d3ffa7 [12/12] RFC: gpio: ixp4xx: Convert to hieararchical GPIOLIB_IRQCHIP
config: arm-ixp4xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.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 d545933b2ffdbd4ad98d45e899faf61180d3ffa7
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

   drivers/gpio/gpio-ixp4xx.c: In function 'ixp4xx_gpio_probe':
>> drivers/gpio/gpio-ixp4xx.c:235:17: error: 'ixp4xx_gpio_to_irq' undeclared (first use in this function); did you mean 'ixp4xx_init_irq'?
     g->gc.to_irq = ixp4xx_gpio_to_irq;
                    ^~~~~~~~~~~~~~~~~~
                    ixp4xx_init_irq
   drivers/gpio/gpio-ixp4xx.c:235:17: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpio/gpio-ixp4xx.c:284:27: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     g->gc.irq.parent_irq_map = &ixp4xx_gpiomap;
                              ^
   drivers/gpio/gpio-ixp4xx.c:187:6: warning: unused variable 'i' [-Wunused-variable]
     int i;
         ^
   cc1: some warnings being treated as errors

vim +235 drivers/gpio/gpio-ixp4xx.c

813e7d36f Linus Walleij 2019-01-25  222  
813e7d36f Linus Walleij 2019-01-25  223  	/* Populate and register gpio chip */
813e7d36f Linus Walleij 2019-01-25  224  	ret = bgpio_init(&g->gc, dev, 4,
813e7d36f Linus Walleij 2019-01-25  225  			 g->base + IXP4XX_REG_GPIN,
813e7d36f Linus Walleij 2019-01-25  226  			 g->base + IXP4XX_REG_GPOUT,
813e7d36f Linus Walleij 2019-01-25  227  			 NULL,
813e7d36f Linus Walleij 2019-01-25  228  			 NULL,
813e7d36f Linus Walleij 2019-01-25  229  			 g->base + IXP4XX_REG_GPOE,
813e7d36f Linus Walleij 2019-01-25  230  			 flags);
813e7d36f Linus Walleij 2019-01-25  231  	if (ret) {
813e7d36f Linus Walleij 2019-01-25  232  		dev_err(dev, "unable to init generic GPIO\n");
813e7d36f Linus Walleij 2019-01-25  233  		return ret;
813e7d36f Linus Walleij 2019-01-25  234  	}
813e7d36f Linus Walleij 2019-01-25 @235  	g->gc.to_irq = ixp4xx_gpio_to_irq;
813e7d36f Linus Walleij 2019-01-25  236  	g->gc.ngpio = 16;
813e7d36f Linus Walleij 2019-01-25  237  	g->gc.label = "IXP4XX_GPIO_CHIP";
813e7d36f Linus Walleij 2019-01-25  238  	/*
813e7d36f Linus Walleij 2019-01-25  239  	 * TODO: when we have migrated to device tree and all GPIOs
813e7d36f Linus Walleij 2019-01-25  240  	 * are fetched using phandles, set this to -1 to get rid of
813e7d36f Linus Walleij 2019-01-25  241  	 * the fixed gpiochip base.
813e7d36f Linus Walleij 2019-01-25  242  	 */
813e7d36f Linus Walleij 2019-01-25  243  	g->gc.base = 0;
813e7d36f Linus Walleij 2019-01-25  244  	g->gc.parent = &pdev->dev;
813e7d36f Linus Walleij 2019-01-25  245  	g->gc.owner = THIS_MODULE;
813e7d36f Linus Walleij 2019-01-25  246  
813e7d36f Linus Walleij 2019-01-25  247  	ret = devm_gpiochip_add_data(dev, &g->gc, g);
813e7d36f Linus Walleij 2019-01-25  248  	if (ret) {
813e7d36f Linus Walleij 2019-01-25  249  		dev_err(dev, "failed to add SoC gpiochip\n");
813e7d36f Linus Walleij 2019-01-25  250  		return ret;
813e7d36f Linus Walleij 2019-01-25  251  	}
813e7d36f Linus Walleij 2019-01-25  252  
813e7d36f Linus Walleij 2019-01-25  253  	/*
813e7d36f Linus Walleij 2019-01-25  254  	 * When we convert to device tree we will simply look up the
813e7d36f Linus Walleij 2019-01-25  255  	 * parent irqdomain using irq_find_host(parent) as parent comes
813e7d36f Linus Walleij 2019-01-25  256  	 * from IRQCHIP_DECLARE(), then use of_node_to_fwnode() to get
813e7d36f Linus Walleij 2019-01-25  257  	 * the fwnode. For now we need this boardfile style code.
813e7d36f Linus Walleij 2019-01-25  258  	 */
e4bfb0ff7 Linus Walleij 2019-01-28  259  	if (np) {
e4bfb0ff7 Linus Walleij 2019-01-28  260  		struct device_node *irq_parent;
e4bfb0ff7 Linus Walleij 2019-01-28  261  
e4bfb0ff7 Linus Walleij 2019-01-28  262  		irq_parent = of_irq_find_parent(np);
e4bfb0ff7 Linus Walleij 2019-01-28  263  		if (!irq_parent) {
e4bfb0ff7 Linus Walleij 2019-01-28  264  			dev_err(dev, "no IRQ parent node\n");
e4bfb0ff7 Linus Walleij 2019-01-28  265  			return -ENODEV;
e4bfb0ff7 Linus Walleij 2019-01-28  266  		}
e4bfb0ff7 Linus Walleij 2019-01-28  267  		parent = irq_find_host(irq_parent);
e4bfb0ff7 Linus Walleij 2019-01-28  268  		if (!parent) {
e4bfb0ff7 Linus Walleij 2019-01-28  269  			dev_err(dev, "no IRQ parent domain\n");
e4bfb0ff7 Linus Walleij 2019-01-28  270  			return -ENODEV;
e4bfb0ff7 Linus Walleij 2019-01-28  271  		}
e4bfb0ff7 Linus Walleij 2019-01-28  272  		g->fwnode = of_node_to_fwnode(np);
e4bfb0ff7 Linus Walleij 2019-01-28  273  	} else {
813e7d36f Linus Walleij 2019-01-25  274  		parent = ixp4xx_get_irq_domain();
813e7d36f Linus Walleij 2019-01-25  275  		g->fwnode = irq_domain_alloc_fwnode(g->base);
813e7d36f Linus Walleij 2019-01-25  276  		if (!g->fwnode) {
813e7d36f Linus Walleij 2019-01-25  277  			dev_err(dev, "no domain base\n");
813e7d36f Linus Walleij 2019-01-25  278  			return -ENODEV;
813e7d36f Linus Walleij 2019-01-25  279  		}
e4bfb0ff7 Linus Walleij 2019-01-28  280  	}
813e7d36f Linus Walleij 2019-01-25  281  
d545933b2 Linus Walleij 2019-06-02  282  	g->gc.irq.fwnode = g->fwnode;
d545933b2 Linus Walleij 2019-06-02  283  	g->gc.irq.parent_domain = parent;
d545933b2 Linus Walleij 2019-06-02 @284  	g->gc.irq.parent_irq_map = &ixp4xx_gpiomap;
d545933b2 Linus Walleij 2019-06-02  285  	g->gc.irq.parent_n_irq_maps = ARRAY_SIZE(ixp4xx_gpiomap);
d545933b2 Linus Walleij 2019-06-02  286  	ret = gpiochip_irqchip_add(&g->gc, &ixp4xx_gpio_irqchip,
d545933b2 Linus Walleij 2019-06-02  287  				   0, handle_bad_irq,
d545933b2 Linus Walleij 2019-06-02  288  				   IRQ_TYPE_NONE);
d545933b2 Linus Walleij 2019-06-02  289          if (ret) {
d545933b2 Linus Walleij 2019-06-02  290  		dev_info(dev, "could not add irqchip\n");
813e7d36f Linus Walleij 2019-01-25  291  		irq_domain_free_fwnode(g->fwnode);
d545933b2 Linus Walleij 2019-06-02  292  		return -ENODEV;
e4bfb0ff7 Linus Walleij 2019-01-28  293          }
d545933b2 Linus Walleij 2019-06-02  294  	gpiochip_set_hierarchical_irqchip(&g->gc, &ixp4xx_gpio_irqchip);
813e7d36f Linus Walleij 2019-01-25  295  
813e7d36f Linus Walleij 2019-01-25  296  	platform_set_drvdata(pdev, g);
813e7d36f Linus Walleij 2019-01-25  297  	dev_info(dev, "IXP4 GPIO @%p registered\n", g->base);
813e7d36f Linus Walleij 2019-01-25  298  
813e7d36f Linus Walleij 2019-01-25  299  	return 0;
813e7d36f Linus Walleij 2019-01-25  300  }
813e7d36f Linus Walleij 2019-01-25  301  

:::::: The code at line 235 was first introduced by commit
:::::: 813e7d36f22762f89856048a32446c8972309566 gpio: ixp4xx: Add driver for the IXP4xx GPIO

:::::: TO: Linus Walleij <linus.walleij@xxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@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