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: i386-randconfig-r004-20221010 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) 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=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/i2c/busses/i2c-designware-slave.c:183:15: error: incompatible pointer types passing 'struct dw_i2c_dev *' to parameter of type 'struct regmap *' [-Werror,-Wincompatible-pointer-types] regmap_read(dev, DW_IC_RXFLR, &rx_valid); ^~~ include/linux/regmap.h:1173:32: note: passing argument to parameter 'map' here int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); ^ 1 error generated. vim +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