[pinctrl:devel 32/32] drivers//pinctrl/pinctrl-adi2.c:426:7: error: implicit declaration of function 'gpio_get_value'

[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:   f2310ceb9fa304a0388c2dcac0faf0c36d9d4354
commit: f2310ceb9fa304a0388c2dcac0faf0c36d9d4354 [32/32] blackfin: Fix local <asm/gpio.h> includes
config: blackfin-allyesconfig (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 f2310ceb9fa304a0388c2dcac0faf0c36d9d4354
        # save the attached .config to linux build tree
        make.cross ARCH=blackfin 

All errors (new ones prefixed by >>):

   drivers//pinctrl/pinctrl-adi2.c: In function 'port_setup':
   drivers//pinctrl/pinctrl-adi2.c:225:21: error: dereferencing pointer to incomplete type 'struct gpio_port_t'
      writew(readw(&regs->port_fer) & ~BIT(offset),
                        ^~
   drivers//pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq':
   drivers//pinctrl/pinctrl-adi2.c:270:18: error: dereferencing pointer to incomplete type 'struct bfin_pint_regs'
      if (readl(&regs->invert_set) & pintbit)
                     ^~
   drivers//pinctrl/pinctrl-adi2.c: In function 'adi_gpio_irq_type':
>> drivers//pinctrl/pinctrl-adi2.c:426:7: error: implicit declaration of function 'gpio_get_value' [-Werror=implicit-function-declaration]
      if (gpio_get_value(port->chip.base + d->hwirq))
          ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/gpio_get_value +426 drivers//pinctrl/pinctrl-adi2.c

e9a03add Sonic Zhang         2013-09-03  379  
e9a03add Sonic Zhang         2013-09-03  380  static int adi_gpio_irq_type(struct irq_data *d, unsigned int type)
e9a03add Sonic Zhang         2013-09-03  381  {
e9a03add Sonic Zhang         2013-09-03  382  	unsigned long flags;
e9a03add Sonic Zhang         2013-09-03  383  	struct gpio_port *port = irq_data_get_irq_chip_data(d);
010c51e1 Sonic Zhang         2013-10-08  384  	struct gpio_pint_regs *pint_regs;
e9a03add Sonic Zhang         2013-09-03  385  	unsigned pintmask;
e9a03add Sonic Zhang         2013-09-03  386  	unsigned int irq = d->irq;
e9a03add Sonic Zhang         2013-09-03  387  	int ret = 0;
e9a03add Sonic Zhang         2013-09-03  388  	char buf[16];
e9a03add Sonic Zhang         2013-09-03  389  
e9a03add Sonic Zhang         2013-09-03  390  	if (!port) {
010c51e1 Sonic Zhang         2013-10-08  391  		pr_err("GPIO IRQ %d :Not exist\n", d->irq);
e9a03add Sonic Zhang         2013-09-03  392  		return -ENODEV;
e9a03add Sonic Zhang         2013-09-03  393  	}
e9a03add Sonic Zhang         2013-09-03  394  
010c51e1 Sonic Zhang         2013-10-08  395  	pint_regs = port->pint->regs;
010c51e1 Sonic Zhang         2013-10-08  396  
e9a03add Sonic Zhang         2013-09-03  397  	pintmask = hwirq_to_pintbit(port, d->hwirq);
e9a03add Sonic Zhang         2013-09-03  398  
e9a03add Sonic Zhang         2013-09-03  399  	spin_lock_irqsave(&port->lock, flags);
010c51e1 Sonic Zhang         2013-10-08  400  	spin_lock(&port->pint->lock);
e9a03add Sonic Zhang         2013-09-03  401  
e9a03add Sonic Zhang         2013-09-03  402  	/* In case of interrupt autodetect, set irq type to edge sensitive. */
e9a03add Sonic Zhang         2013-09-03  403  	if (type == IRQ_TYPE_PROBE)
e9a03add Sonic Zhang         2013-09-03  404  		type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING;
e9a03add Sonic Zhang         2013-09-03  405  
e9a03add Sonic Zhang         2013-09-03  406  	if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
e9a03add Sonic Zhang         2013-09-03  407  		    IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) {
719e231b Rickard Strandqvist 2014-06-26  408  		snprintf(buf, 16, "gpio-irq%u", irq);
e9a03add Sonic Zhang         2013-09-03  409  		port_setup(port, d->hwirq, true);
e9a03add Sonic Zhang         2013-09-03  410  	} else
e9a03add Sonic Zhang         2013-09-03  411  		goto out;
e9a03add Sonic Zhang         2013-09-03  412  
e9a03add Sonic Zhang         2013-09-03  413  	/* The GPIO interrupt is triggered only when its input value
e9a03add Sonic Zhang         2013-09-03  414  	 * transfer from 0 to 1. So, invert the input value if the
e9a03add Sonic Zhang         2013-09-03  415  	 * irq type is low or falling
e9a03add Sonic Zhang         2013-09-03  416  	 */
e9a03add Sonic Zhang         2013-09-03  417  	if ((type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_LEVEL_LOW)))
e9a03add Sonic Zhang         2013-09-03  418  		writel(pintmask, &pint_regs->invert_set);
e9a03add Sonic Zhang         2013-09-03  419  	else
e9a03add Sonic Zhang         2013-09-03  420  		writel(pintmask, &pint_regs->invert_clear);
e9a03add Sonic Zhang         2013-09-03  421  
e9a03add Sonic Zhang         2013-09-03  422  	/* In edge sensitive case, if the input value of the requested irq
e9a03add Sonic Zhang         2013-09-03  423  	 * is already 1, invert it.
e9a03add Sonic Zhang         2013-09-03  424  	 */
e9a03add Sonic Zhang         2013-09-03  425  	if ((type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) {
e9a03add Sonic Zhang         2013-09-03 @426  		if (gpio_get_value(port->chip.base + d->hwirq))
e9a03add Sonic Zhang         2013-09-03  427  			writel(pintmask, &pint_regs->invert_set);
e9a03add Sonic Zhang         2013-09-03  428  		else
e9a03add Sonic Zhang         2013-09-03  429  			writel(pintmask, &pint_regs->invert_clear);
e9a03add Sonic Zhang         2013-09-03  430  	}
e9a03add Sonic Zhang         2013-09-03  431  
e9a03add Sonic Zhang         2013-09-03  432  	if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
e9a03add Sonic Zhang         2013-09-03  433  		writel(pintmask, &pint_regs->edge_set);
e0d6a2c6 Thomas Gleixner     2015-06-23  434  		irq_set_handler_locked(d, handle_edge_irq);
e9a03add Sonic Zhang         2013-09-03  435  	} else {
e9a03add Sonic Zhang         2013-09-03  436  		writel(pintmask, &pint_regs->edge_clear);
e0d6a2c6 Thomas Gleixner     2015-06-23  437  		irq_set_handler_locked(d, handle_level_irq);
e9a03add Sonic Zhang         2013-09-03  438  	}
e9a03add Sonic Zhang         2013-09-03  439  
e9a03add Sonic Zhang         2013-09-03  440  out:
010c51e1 Sonic Zhang         2013-10-08  441  	spin_unlock(&port->pint->lock);
e9a03add Sonic Zhang         2013-09-03  442  	spin_unlock_irqrestore(&port->lock, flags);
e9a03add Sonic Zhang         2013-09-03  443  
e9a03add Sonic Zhang         2013-09-03  444  	return ret;
e9a03add Sonic Zhang         2013-09-03  445  }
e9a03add Sonic Zhang         2013-09-03  446  

:::::: The code at line 426 was first introduced by commit
:::::: e9a03add0c6ed5341fc59ff9c76843c2888a33fa pinctrl: ADI PIN control driver for the GPIO controller on bf54x and bf60x.

:::::: TO: Sonic Zhang <sonic.zhang@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