Hi Andi: Thank you for your reply. Andi Shyti <andi.shyti@xxxxxxxxxx> 於 2024年11月20日 週三 上午6:22寫道: > > Hi Tyrone, > > Sorry for the late reply! > > ... > > > > > @@ -2172,7 +2191,6 @@ static int npcm_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, > > > > } > > > > > > > > npcm_i2c_init_params(bus); > > > > - bus->dest_addr = slave_addr; > > > > > > We can now get rid of slave_addr. It's just used in > > > npcm_i2c_master_start_xmit(). Right? > > > > Yes, slave_addr is just used as the link > > https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-npcm7xx.c#L2182 > > suggests with this patch. > > What I mean is that slave_addr now is completely unused. We > declare it, we initialize it to msg0->addr and it stays like > this. > > What I'm suggesting is to remove it completely. > Sorry that I might not describe it clearly in previous discussion thread. slave_addr is passed to npcm_i2c_master_start_xmit() as https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-npcm7xx.c#L2182 suggests. If slave_addr is removed, may I use "(bus->dest_addr &= ~I2C_M_RD)" to replace the slave_addr parameter to npcm_i2c_master_start_xmit()? > Andi Thank you. Regards, Tyrone