lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Dec 2016 07:44:33 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Luis Oliveira <Luis.Oliveira@...opsys.com>
Cc:     kbuild-all@...org, wsa@...-dreams.de, robh+dt@...nel.org,
        mark.rutland@....com, jarkko.nikula@...ux.intel.com,
        andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com,
        linux-i2c@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Luis.Oliveira@...opsys.com,
        Ramiro.Oliveira@...opsys.com, Joao.Pinto@...opsys.com,
        CARLOS.PALMINHA@...opsys.com
Subject: Re: [PATCH v4 4/5] i2c: designware: Add slave mode as separated
 driver

Hi Luis,

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on next-20161209]
[cannot apply to v4.9-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Luis-Oliveira/i2c-designware-Refactoring-of-the-i2c-designware/20161208-044045
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: i386-randconfig-c0-12110449 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/i2c/busses/i2c-designware-slave.c: In function 'i2c_dw_irq_handler_slave':
>> drivers/i2c/busses/i2c-designware-slave.c:294:3: error: implicit declaration of function 'i2c_slave_event' [-Werror=implicit-function-declaration]
      i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_REQUESTED, &val);
      ^
>> drivers/i2c/busses/i2c-designware-slave.c:294:31: error: 'I2C_SLAVE_WRITE_REQUESTED' undeclared (first use in this function)
      i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_REQUESTED, &val);
                                  ^
   drivers/i2c/busses/i2c-designware-slave.c:294:31: note: each undeclared identifier is reported only once for each function it appears in
   In file included from include/linux/err.h:4:0,
                    from drivers/i2c/busses/i2c-designware-slave.c:26:
>> drivers/i2c/busses/i2c-designware-slave.c:301:6: error: 'I2C_SLAVE_WRITE_RECEIVED' undeclared (first use in this function)
         I2C_SLAVE_WRITE_RECEIVED, &val)) {
         ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
   drivers/i2c/busses/i2c-designware-slave.c:300:5: note: in expansion of macro 'if'
        if (!i2c_slave_event(dev->slave,
        ^
>> drivers/i2c/busses/i2c-designware-slave.c:313:7: error: 'I2C_SLAVE_READ_REQUESTED' undeclared (first use in this function)
          I2C_SLAVE_READ_REQUESTED, &val))
          ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
   drivers/i2c/busses/i2c-designware-slave.c:312:4: note: in expansion of macro 'if'
       if (!i2c_slave_event(dev->slave,
       ^
>> drivers/i2c/busses/i2c-designware-slave.c:319:36: error: 'I2C_SLAVE_READ_PROCESSED' undeclared (first use in this function)
      if (!i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED,
                                       ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
   drivers/i2c/busses/i2c-designware-slave.c:319:3: note: in expansion of macro 'if'
      if (!i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED,
      ^
>> drivers/i2c/busses/i2c-designware-slave.c:323:31: error: 'I2C_SLAVE_STOP' undeclared (first use in this function)
      i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
                                  ^
   drivers/i2c/busses/i2c-designware-slave.c: At top level:
>> drivers/i2c/busses/i2c-designware-slave.c:358:2: error: unknown field 'reg_slave' specified in initializer
     .reg_slave = i2c_dw_reg_slave,
     ^
   drivers/i2c/busses/i2c-designware-slave.c:358:2: warning: excess elements in struct initializer
   drivers/i2c/busses/i2c-designware-slave.c:358:2: warning: (near initialization for 'i2c_dw_algo')
>> drivers/i2c/busses/i2c-designware-slave.c:359:2: error: unknown field 'unreg_slave' specified in initializer
     .unreg_slave = i2c_dw_unreg_slave,
     ^
   drivers/i2c/busses/i2c-designware-slave.c:359:2: warning: excess elements in struct initializer
   drivers/i2c/busses/i2c-designware-slave.c:359:2: warning: (near initialization for 'i2c_dw_algo')
   cc1: some warnings being treated as errors

vim +/i2c_slave_event +294 drivers/i2c/busses/i2c-designware-slave.c

   288			dw_readl(dev, DW_IC_CLR_START_DET);
   289		if (stat & DW_IC_INTR_ACTIVITY)
   290			dw_readl(dev, DW_IC_CLR_ACTIVITY);
   291		if (stat & DW_IC_INTR_RX_OVER)
   292			dw_readl(dev, DW_IC_CLR_RX_OVER);
   293		if ((stat & DW_IC_INTR_RX_FULL) && (stat & DW_IC_INTR_STOP_DET))
 > 294			i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_REQUESTED, &val);
   295	
   296		if (slave_activity) {
   297			if (stat & DW_IC_INTR_RD_REQ) {
   298				if (stat & DW_IC_INTR_RX_FULL) {
   299					val = dw_readl(dev, DW_IC_DATA_CMD);
   300					if (!i2c_slave_event(dev->slave,
 > 301					 I2C_SLAVE_WRITE_RECEIVED, &val)) {
   302						dev_dbg(dev->dev, "Byte %X acked!",
   303						 val);
   304					}
   305					dw_readl(dev, DW_IC_CLR_RD_REQ);
   306					stat = i2c_dw_read_clear_intrbits_slave(dev);
   307				} else {
   308					dw_readl(dev, DW_IC_CLR_RD_REQ);
   309					dw_readl(dev, DW_IC_CLR_RX_UNDER);
   310					stat = i2c_dw_read_clear_intrbits_slave(dev);
   311				}
   312				if (!i2c_slave_event(dev->slave,
 > 313						 I2C_SLAVE_READ_REQUESTED, &val))
   314					dw_writel(dev, val, DW_IC_DATA_CMD);
   315			}
   316		}
   317	
   318		if (stat & DW_IC_INTR_RX_DONE) {
 > 319			if (!i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED,
   320			 &val))
   321				dw_readl(dev, DW_IC_CLR_RX_DONE);
   322	
 > 323			i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
   324			stat = i2c_dw_read_clear_intrbits_slave(dev);
   325			return true;
   326		}
   327	
   328		if (stat & DW_IC_INTR_RX_FULL) {
   329			val = dw_readl(dev, DW_IC_DATA_CMD);
   330			if (!i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
   331			 &val))
   332				dev_dbg(dev->dev, "Byte %X acked!", val);
   333		} else {
   334			i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
   335			stat = i2c_dw_read_clear_intrbits_slave(dev);
   336		}
   337	
   338		if (stat & DW_IC_INTR_TX_OVER)
   339			dw_readl(dev, DW_IC_CLR_TX_OVER);
   340	
   341		return true;
   342	}
   343	
   344	static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id)
   345	{
   346		struct dw_i2c_dev *dev = dev_id;
   347	
   348		i2c_dw_read_clear_intrbits_slave(dev);
   349		if (!i2c_dw_irq_handler_slave(dev))
   350			return IRQ_NONE;
   351	
   352		complete(&dev->cmd_complete);
   353		return IRQ_HANDLED;
   354	}
   355	
   356	static struct i2c_algorithm i2c_dw_algo = {
   357		.functionality	= i2c_dw_func,
 > 358		.reg_slave	= i2c_dw_reg_slave,
 > 359		.unreg_slave	= i2c_dw_unreg_slave,
   360	};
   361	
   362	void i2c_dw_disable_slave(struct dw_i2c_dev *dev)

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

Download attachment ".config.gz" of type "application/gzip" (31719 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ