All of lore.kernel.org
 help / color / mirror / Atom feed
* [gpio:fixes 6/6] drivers/gpio/gpio-mcp23s08.c:294:12: error: 'struct mcp23s08' has no member named 'ops'
@ 2017-03-14 20:46 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-03-14 20:46 UTC (permalink / raw)
  To: Robert Middleton; +Cc: kbuild-all, linux-gpio, Linus Walleij

[-- Attachment #1: Type: text/plain, Size: 4728 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git fixes
head:   7b74feff6fdb0820252b75b2313ad7bccfc8515b
commit: 7b74feff6fdb0820252b75b2313ad7bccfc8515b [6/6] gpio:mcp23s08 Fixed missing interrupts
config: i386-randconfig-x070-201711 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 7b74feff6fdb0820252b75b2313ad7bccfc8515b
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpio/gpio-mcp23s08.c: In function 'mcp23s08_irq':
>> drivers/gpio/gpio-mcp23s08.c:294:12: error: 'struct mcp23s08' has no member named 'ops'
     gpio = mcp->ops->read(mcp, MCP_GPIO);
               ^~
>> drivers/gpio/gpio-mcp23s08.c:335:4: error: expected ')' before 'intcap_mask'
       intcap_mask = 0xFF00;
       ^~~~~~~~~~~
>> drivers/gpio/gpio-mcp23s08.c:357:2: error: expected expression before '}' token
     }
     ^
   drivers/gpio/gpio-mcp23s08.c:276:19: warning: unused variable 'gpio_set' [-Wunused-variable]
      defval_changed, gpio_set;
                      ^~~~~~~~
   drivers/gpio/gpio-mcp23s08.c:276:3: warning: unused variable 'defval_changed' [-Wunused-variable]
      defval_changed, gpio_set;
      ^~~~~~~~~~~~~~
   drivers/gpio/gpio-mcp23s08.c:275:33: warning: unused variable 'gpio_bit_changed' [-Wunused-variable]
     bool intf_set, intcap_changed, gpio_bit_changed,
                                    ^~~~~~~~~~~~~~~~
   drivers/gpio/gpio-mcp23s08.c:275:17: warning: unused variable 'intcap_changed' [-Wunused-variable]
     bool intf_set, intcap_changed, gpio_bit_changed,
                    ^~~~~~~~~~~~~~
   drivers/gpio/gpio-mcp23s08.c:274:15: warning: unused variable 'child_irq' [-Wunused-variable]
     unsigned int child_irq;
                  ^~~~~~~~~

vim +294 drivers/gpio/gpio-mcp23s08.c

   288			return IRQ_HANDLED;
   289		}
   290	
   291		mcp->cache[MCP_INTCAP] = intcap;
   292	
   293		/* This clears the interrupt(configurable on S18) */
 > 294		gpio = mcp->ops->read(mcp, MCP_GPIO);
   295		if (gpio < 0) {
   296			mutex_unlock(&mcp->lock);
   297			return IRQ_HANDLED;
   298		}
   299		gpio_orig = mcp->cache[MCP_GPIO];
   300		mcp->cache[MCP_GPIO] = gpio;
   301		mutex_unlock(&mcp->lock);
   302	
   303		if (mcp->cache[MCP_INTF] == 0) {
   304			/* There is no interrupt pending */
   305			return IRQ_HANDLED;
   306		}
   307	
   308		dev_dbg(mcp->chip.parent,
   309			"intcap 0x%04X intf 0x%04X gpio_orig 0x%04X gpio 0x%04X\n",
   310			intcap, intf, gpio_orig, gpio);
   311	
   312		for (i = 0; i < mcp->chip.ngpio; i++) {
   313			/* We must check all of the inputs on the chip,
   314			 * otherwise we may not notice a change on >=2 pins.
   315			 *
   316			 * On at least the mcp23s17, INTCAP is only updated
   317			 * one byte at a time(INTCAPA and INTCAPB are
   318			 * not written to at the same time - only on a per-bank
   319			 * basis).
   320			 *
   321			 * INTF only contains the single bit that caused the
   322			 * interrupt per-bank.  On the mcp23s17, there is
   323			 * INTFA and INTFB.  If two pins are changed on the A
   324			 * side at the same time, INTF will only have one bit
   325			 * set.  If one pin on the A side and one pin on the B
   326			 * side are changed at the same time, INTF will have
   327			 * two bits set.  Thus, INTF can't be the only check
   328			 * to see if the input has changed.
   329			 */
   330	
   331			intf_set = BIT(i) & mcp->cache[MCP_INTF];
   332			if (i < 8 && intf_set)
   333				intcap_mask = 0x00FF;
   334			else if (i >= 8 && intf_set
 > 335				intcap_mask = 0xFF00;
   336			else
   337				intcap_mask = 0x00;
   338	
   339			intcap_changed = (intcap_mask &
   340				(BIT(i) & mcp->cache[MCP_INTCAP])) !=
   341				(intcap_mask & (BIT(i) & gpio_orig));
   342			gpio_set = BIT(i) & mcp->cache[MCP_GPIO];
   343			gpio_bit_changed = (BIT(i) & gpio_orig) !=
   344				(BIT(i) & mcp->cache[MCP_GPIO]);
   345			defval_changed = (BIT(i) & mcp->cache[MCP_INTCON]) &&
   346				((BIT(i) & mcp->cache[MCP_GPIO]) !=
   347				(BIT(i) & mcp->cache[MCP_DEFVAL]));
   348	
   349			if (((gpio_bit_changed || intcap_changed) &&
   350				(BIT(i) & mcp->irq_rise) && gpio_set) ||
   351			    ((gpio_bit_changed || intcap_changed) &&
   352				(BIT(i) & mcp->irq_fall) && !gpio_set) ||
   353			    defval_changed) {
   354				child_irq = irq_find_mapping(mcp->chip.irqdomain, i);
   355				handle_nested_irq(child_irq);
   356			}
 > 357		}
   358	
   359		return IRQ_HANDLED;
   360	}

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25699 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-14 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 20:46 [gpio:fixes 6/6] drivers/gpio/gpio-mcp23s08.c:294:12: error: 'struct mcp23s08' has no member named 'ops' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.