Re: [PATCH v3 08/11] i2c: npcm: Correct register access width
From: Andy Shevchenko
Date: Thu Mar 03 2022 - 05:35:01 EST
On Thu, Mar 03, 2022 at 04:31:38PM +0800, Tyrone Ting wrote:
> From: Tyrone Ting <kfting@xxxxxxxxxxx>
>
> Use ioread8 instead of ioread32 to access the SMBnCTL3 register since
> the register is only 8-bit wide.
> Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
No, this is bad commit message, since you have bitwise masks and there is
nothing to fix from functional point of view. So, why is this a fix?
> Signed-off-by: Tyrone Ting <kfting@xxxxxxxxxxx>
> Signed-off-by: Tali Perry <tali.perry1@xxxxxxxxx>
This is wrong SoB chain.
...
> - return !!(I2CCTL3_SCL_LVL & ioread32(bus->reg + NPCM_I2CCTL3));
> + return !!(I2CCTL3_SCL_LVL & ioread8(bus->reg + NPCM_I2CCTL3));
...
> - return !!(I2CCTL3_SDA_LVL & ioread32(bus->reg + NPCM_I2CCTL3));
> + return !!(I2CCTL3_SDA_LVL & ioread8(bus->reg + NPCM_I2CCTL3));
--
With Best Regards,
Andy Shevchenko