[pinctrl:devel 19/24] drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing pointer to incomplete type 'struct gpio_port_t'

[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:   6cb74f444364c2f05ef21e84b22c82ebcd116131
commit: d219b924611a5cceb17cc6b9a8dd103ab9668c94 [19/24] 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 errors (new ones prefixed by >>):

   drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup':
>> drivers/pinctrl/pinctrl-adi2.c:221: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:266:18: error: dereferencing pointer to incomplete type 'struct bfin_pint_regs'
      if (readl(&regs->invert_set) & pintbit)
                     ^~

vim +221 drivers/pinctrl/pinctrl-adi2.c

e9a03add Sonic Zhang 2013-09-03  214  
e9a03add Sonic Zhang 2013-09-03  215  static inline void port_setup(struct gpio_port *port, unsigned offset,
e9a03add Sonic Zhang 2013-09-03  216  	bool use_for_gpio)
e9a03add Sonic Zhang 2013-09-03  217  {
e9a03add Sonic Zhang 2013-09-03  218  	struct gpio_port_t *regs = port->regs;
e9a03add Sonic Zhang 2013-09-03  219  
e9a03add Sonic Zhang 2013-09-03  220  	if (use_for_gpio)
e9a03add Sonic Zhang 2013-09-03 @221  		writew(readw(&regs->port_fer) & ~BIT(offset),
e9a03add Sonic Zhang 2013-09-03  222  			&regs->port_fer);
e9a03add Sonic Zhang 2013-09-03  223  	else
e9a03add Sonic Zhang 2013-09-03  224  		writew(readw(&regs->port_fer) | BIT(offset), &regs->port_fer);
e9a03add Sonic Zhang 2013-09-03  225  }
e9a03add Sonic Zhang 2013-09-03  226  
e9a03add Sonic Zhang 2013-09-03  227  static inline void portmux_setup(struct gpio_port *port, unsigned offset,
e9a03add Sonic Zhang 2013-09-03  228  	unsigned short function)
e9a03add Sonic Zhang 2013-09-03  229  {
e9a03add Sonic Zhang 2013-09-03  230  	struct gpio_port_t *regs = port->regs;
e9a03add Sonic Zhang 2013-09-03  231  	u32 pmux;
e9a03add Sonic Zhang 2013-09-03  232  
e9a03add Sonic Zhang 2013-09-03  233  	pmux = readl(&regs->port_mux);
e9a03add Sonic Zhang 2013-09-03  234  
e9a03add Sonic Zhang 2013-09-03  235  	/* The function field of each pin has 2 consecutive bits in
e9a03add Sonic Zhang 2013-09-03  236  	 * the mux register.
e9a03add Sonic Zhang 2013-09-03  237  	 */
e9a03add Sonic Zhang 2013-09-03  238  	pmux &= ~(0x3 << (2 * offset));
e9a03add Sonic Zhang 2013-09-03  239  	pmux |= (function & 0x3) << (2 * offset);
e9a03add Sonic Zhang 2013-09-03  240  
e9a03add Sonic Zhang 2013-09-03  241  	writel(pmux, &regs->port_mux);
e9a03add Sonic Zhang 2013-09-03  242  }
e9a03add Sonic Zhang 2013-09-03  243  
e9a03add Sonic Zhang 2013-09-03  244  static inline u16 get_portmux(struct gpio_port *port, unsigned offset)
e9a03add Sonic Zhang 2013-09-03  245  {
e9a03add Sonic Zhang 2013-09-03  246  	struct gpio_port_t *regs = port->regs;
e9a03add Sonic Zhang 2013-09-03  247  	u32 pmux = readl(&regs->port_mux);
e9a03add Sonic Zhang 2013-09-03  248  
e9a03add Sonic Zhang 2013-09-03  249  	/* The function field of each pin has 2 consecutive bits in
e9a03add Sonic Zhang 2013-09-03  250  	 * the mux register.
e9a03add Sonic Zhang 2013-09-03  251  	 */
e9a03add Sonic Zhang 2013-09-03  252  	return pmux >> (2 * offset) & 0x3;
e9a03add Sonic Zhang 2013-09-03  253  }
e9a03add Sonic Zhang 2013-09-03  254  
e9a03add Sonic Zhang 2013-09-03  255  static void adi_gpio_ack_irq(struct irq_data *d)
e9a03add Sonic Zhang 2013-09-03  256  {
e9a03add Sonic Zhang 2013-09-03  257  	unsigned long flags;
e9a03add Sonic Zhang 2013-09-03  258  	struct gpio_port *port = irq_data_get_irq_chip_data(d);
e9a03add Sonic Zhang 2013-09-03  259  	struct gpio_pint_regs *regs = port->pint->regs;
e9a03add Sonic Zhang 2013-09-03  260  	unsigned pintbit = hwirq_to_pintbit(port, d->hwirq);
e9a03add Sonic Zhang 2013-09-03  261  
e9a03add Sonic Zhang 2013-09-03  262  	spin_lock_irqsave(&port->lock, flags);
010c51e1 Sonic Zhang 2013-10-08  263  	spin_lock(&port->pint->lock);
e9a03add Sonic Zhang 2013-09-03  264  
e9a03add Sonic Zhang 2013-09-03  265  	if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
e9a03add Sonic Zhang 2013-09-03 @266  		if (readl(&regs->invert_set) & pintbit)
e9a03add Sonic Zhang 2013-09-03  267  			writel(pintbit, &regs->invert_clear);
e9a03add Sonic Zhang 2013-09-03  268  		else
e9a03add Sonic Zhang 2013-09-03  269  			writel(pintbit, &regs->invert_set);
e9a03add Sonic Zhang 2013-09-03  270  	}
e9a03add Sonic Zhang 2013-09-03  271  
e9a03add Sonic Zhang 2013-09-03  272  	writel(pintbit, &regs->request);
e9a03add Sonic Zhang 2013-09-03  273  
010c51e1 Sonic Zhang 2013-10-08  274  	spin_unlock(&port->pint->lock);
e9a03add Sonic Zhang 2013-09-03  275  	spin_unlock_irqrestore(&port->lock, flags);
e9a03add Sonic Zhang 2013-09-03  276  }
e9a03add Sonic Zhang 2013-09-03  277  

:::::: The code at line 221 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