All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [v7] i2c: imx: support slave mode for imx I2C driver
Date: Mon, 19 Oct 2020 23:43:59 +0800	[thread overview]
Message-ID: <202010192312.TYBYoWWc-lkp@intel.com> (raw)
In-Reply-To: <20201016082435.11593-1-biwen.li@oss.nxp.com>

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

Hi Biwen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v5.9]
[cannot apply to wsa/i2c/for-next next-20201016]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Biwen-Li/i2c-imx-support-slave-mode-for-imx-I2C-driver/20201016-163639
base:    bbf5c979011a099af5dc76498918ed7df445635b
config: arm-randconfig-r004-20201019 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 094e9f4779eb9b5c6a49014f2f80b8cbb833572f)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/afe1305a21d6e88b2c015cf62f84893cd9c462d5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Biwen-Li/i2c-imx-support-slave-mode-for-imx-I2C-driver/20201016-163639
        git checkout afe1305a21d6e88b2c015cf62f84893cd9c462d5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-imx.c:667:4: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration]
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
                           ^
>> drivers/i2c/busses/i2c-imx.c:667:36: error: use of undeclared identifier 'I2C_SLAVE_READ_REQUESTED'
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
                                                           ^
   drivers/i2c/busses/i2c-imx.c:677:4: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration]
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
                           ^
>> drivers/i2c/busses/i2c-imx.c:677:36: error: use of undeclared identifier 'I2C_SLAVE_WRITE_REQUESTED'
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
                                                           ^
   drivers/i2c/busses/i2c-imx.c:688:4: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration]
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
                           ^
>> drivers/i2c/busses/i2c-imx.c:688:36: error: use of undeclared identifier 'I2C_SLAVE_WRITE_RECEIVED'
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
                                                           ^
   drivers/i2c/busses/i2c-imx.c:692:4: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration]
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_STOP, &value);
                           ^
>> drivers/i2c/busses/i2c-imx.c:692:36: error: use of undeclared identifier 'I2C_SLAVE_STOP'
                           i2c_slave_event(i2c_imx->slave, I2C_SLAVE_STOP, &value);
                                                           ^
   drivers/i2c/busses/i2c-imx.c:698:3: error: implicit declaration of function 'i2c_slave_event' [-Werror,-Wimplicit-function-declaration]
                   i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_PROCESSED, &value);
                   ^
>> drivers/i2c/busses/i2c-imx.c:698:35: error: use of undeclared identifier 'I2C_SLAVE_READ_PROCESSED'
                   i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_PROCESSED, &value);
                                                   ^
>> drivers/i2c/busses/i2c-imx.c:1301:3: error: field designator 'reg_slave' does not refer to any field in type 'const struct i2c_algorithm'
           .reg_slave      = i2c_imx_reg_slave,
            ^
>> drivers/i2c/busses/i2c-imx.c:1302:3: error: field designator 'unreg_slave' does not refer to any field in type 'const struct i2c_algorithm'
           .unreg_slave    = i2c_imx_unreg_slave,
            ^
   12 errors generated.

vim +/i2c_slave_event +667 drivers/i2c/busses/i2c-imx.c

   656	
   657	static irqreturn_t i2c_imx_slave_isr(struct imx_i2c_struct *i2c_imx,
   658					     unsigned int status, unsigned int ctl)
   659	{
   660		u8 value;
   661	
   662		if (status & I2SR_IAL) { /* Arbitration lost */
   663			i2c_imx_clr_al_bit(status | I2SR_IIF, i2c_imx);
   664		} else if (status & I2SR_IAAS) { /* Addressed as a slave */
   665			if (status & I2SR_SRW) { /* Master wants to read from us*/
   666				dev_dbg(&i2c_imx->adapter.dev, "read requested");
 > 667				i2c_slave_event(i2c_imx->slave, I2C_SLAVE_READ_REQUESTED, &value);
   668	
   669				/* Slave transmit */
   670				ctl |= I2CR_MTX;
   671				imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
   672	
   673				/* Send data */
   674				imx_i2c_write_reg(value, i2c_imx, IMX_I2C_I2DR);
   675			} else { /* Master wants to write to us */
   676				dev_dbg(&i2c_imx->adapter.dev, "write requested");
 > 677				i2c_slave_event(i2c_imx->slave,	I2C_SLAVE_WRITE_REQUESTED, &value);
   678	
   679				/* Slave receive */
   680				ctl &= ~I2CR_MTX;
   681				imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
   682				/* Dummy read */
   683				imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
   684			}
   685		} else if (!(ctl & I2CR_MTX)) { /* Receive mode */
   686			if (status & I2SR_IBB) { /* No STOP signal detected */
   687				value = imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
 > 688				i2c_slave_event(i2c_imx->slave,	I2C_SLAVE_WRITE_RECEIVED, &value);
   689			} else { /* STOP signal is detected */
   690				dev_dbg(&i2c_imx->adapter.dev,
   691					"STOP signal detected");
 > 692				i2c_slave_event(i2c_imx->slave, I2C_SLAVE_STOP, &value);
   693			}
   694		} else if (!(status & I2SR_RXAK)) { /* Transmit mode received ACK */
   695			ctl |= I2CR_MTX;
   696			imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
   697	
 > 698			i2c_slave_event(i2c_imx->slave,	I2C_SLAVE_READ_PROCESSED, &value);
   699	
   700			imx_i2c_write_reg(value, i2c_imx, IMX_I2C_I2DR);
   701		} else { /* Transmit mode received NAK */
   702			ctl &= ~I2CR_MTX;
   703			imx_i2c_write_reg(ctl, i2c_imx, IMX_I2C_I2CR);
   704			imx_i2c_read_reg(i2c_imx, IMX_I2C_I2DR);
   705		}
   706	
   707		return IRQ_HANDLED;
   708	}
   709	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

  reply	other threads:[~2020-10-19 15:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  8:24 [v7] i2c: imx: support slave mode for imx I2C driver Biwen Li
2020-10-16  8:24 ` Biwen Li
2020-10-19 15:43 ` kernel test robot [this message]
2020-10-19 15:46 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010192312.TYBYoWWc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.