The assignment of `serial` is using le32_to_cpu() without first converting the parameter `dev->ibuffer` to __le32. This produces a Sparse warning of: `warning: cast to restricted __le32` Signed-off-by: Adam Zerella <adam.zerella@xxxxxxxxx> --- drivers/i2c/busses/i2c-diolan-u2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c index 382f105e0fe3..32de47eda950 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c @@ -289,7 +289,7 @@ static void diolan_get_serial(struct i2c_diolan_u2c *dev) ret = diolan_usb_cmd(dev, CMD_GET_SERIAL, true); if (ret >= 4) { - serial = le32_to_cpu(*(u32 *)dev->ibuffer); + serial = le32_to_cpu(cpu_to_le32(*(u32 *)dev->ibuffer)); dev_info(&dev->interface->dev, "Diolan U2C serial number %u\n", serial); } -- 2.21.0