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:   Mon, 10 Oct 2022 16:13:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     tianye@...on.com, jarkko.nikula@...ux.intel.com,
        andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com,
        jsd@...ihalf.com
Cc:     kbuild-all@...ts.01.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, Tian Ye <tianye@...on.com>
Subject: Re: [PATCH] i2c: designware: slave should do WRITE_RECEIVED before
 SLAVE_STOP

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on linus/master v6.0 next-20221010]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/tianye-sugon-com/i2c-designware-slave-should-do-WRITE_RECEIVED-before-SLAVE_STOP/20221010-121111
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: sparc64-randconfig-r011-20221010
compiler: sparc64-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/c82b6e6ac99563d4bb8ef11dbf1e402b755ed2c4
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review tianye-sugon-com/i2c-designware-slave-should-do-WRITE_RECEIVED-before-SLAVE_STOP/20221010-121111
        git checkout c82b6e6ac99563d4bb8ef11dbf1e402b755ed2c4
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/i2c/busses/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

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:183:29: error: passing argument 1 of 'regmap_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
     183 |                 regmap_read(dev, DW_IC_RXFLR, &rx_valid);
         |                             ^~~
         |                             |
         |                             struct dw_i2c_dev *
   In file included from drivers/i2c/busses/i2c-designware-slave.c:17:
   include/linux/regmap.h:1173:32: note: expected 'struct regmap *' but argument is of type 'struct dw_i2c_dev *'
    1173 | int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
         |                 ~~~~~~~~~~~~~~~^~~
   cc1: some warnings being treated as errors


vim +/regmap_read +183 drivers/i2c/busses/i2c-designware-slave.c

   151	
   152	/*
   153	 * Interrupt service routine. This gets called whenever an I2C slave interrupt
   154	 * occurs.
   155	 */
   156	
   157	static int i2c_dw_irq_handler_slave(struct dw_i2c_dev *dev)
   158	{
   159		u32 raw_stat, stat, enabled, tmp;
   160		u8 val = 0, slave_activity;
   161		u32 rx_valid;
   162	
   163		regmap_read(dev->map, DW_IC_ENABLE, &enabled);
   164		regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_stat);
   165		regmap_read(dev->map, DW_IC_STATUS, &tmp);
   166		slave_activity = ((tmp & DW_IC_STATUS_SLAVE_ACTIVITY) >> 6);
   167	
   168		if (!enabled || !(raw_stat & ~DW_IC_INTR_ACTIVITY) || !dev->slave)
   169			return 0;
   170	
   171		stat = i2c_dw_read_clear_intrbits_slave(dev);
   172		dev_dbg(dev->dev,
   173			"%#x STATUS SLAVE_ACTIVITY=%#x : RAW_INTR_STAT=%#x : INTR_STAT=%#x\n",
   174			enabled, slave_activity, raw_stat, stat);
   175	
   176		if (stat & DW_IC_INTR_RX_FULL) {
   177			if (dev->status != STATUS_WRITE_IN_PROGRESS) {
   178				dev->status = STATUS_WRITE_IN_PROGRESS;
   179				i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_REQUESTED,
   180						&val);
   181			}
   182	
 > 183			regmap_read(dev, DW_IC_RXFLR, &rx_valid);
   184			for (; rx_valid > 0; rx_valid--) {
   185				regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
   186				val = tmp;
   187				if (!i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
   188						     &val))
   189					dev_vdbg(dev->dev, "Byte %X acked!", val);
   190			}
   191		}
   192	
   193		if (stat & DW_IC_INTR_RD_REQ) {
   194			if (slave_activity) {
   195				regmap_read(dev->map, DW_IC_CLR_RD_REQ, &tmp);
   196	
   197				dev->status = STATUS_READ_IN_PROGRESS;
   198				if (!i2c_slave_event(dev->slave,
   199						     I2C_SLAVE_READ_REQUESTED,
   200						     &val))
   201					regmap_write(dev->map, DW_IC_DATA_CMD, val);
   202			}
   203		}
   204	
   205		if (stat & DW_IC_INTR_RX_DONE) {
   206			if (!i2c_slave_event(dev->slave, I2C_SLAVE_READ_PROCESSED,
   207					     &val))
   208				regmap_read(dev->map, DW_IC_CLR_RX_DONE, &tmp);
   209		}
   210	
   211		if (stat & DW_IC_INTR_STOP_DET) {
   212			dev->status = STATUS_IDLE;
   213			i2c_slave_event(dev->slave, I2C_SLAVE_STOP, &val);
   214		}
   215	
   216		return 1;
   217	}
   218	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (126015 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ