Commit 08e019e2 authored by Khalil Blaiech's avatar Khalil Blaiech Committed by Wolfram Sang

i2c: mlxbf: Fix resrticted cast warning of sparse

Address warnings "warning: cast to restricted __be32" reported
by sparse.

Fixes: b5b5b320 ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Signed-off-by: default avatarKhalil Blaiech <kblaiech@nvidia.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent ed01ddc6
...@@ -510,7 +510,7 @@ static u32 mlxbf_i2c_read(void __iomem *io, int reg) ...@@ -510,7 +510,7 @@ static u32 mlxbf_i2c_read(void __iomem *io, int reg)
*/ */
static u32 mlxbf_i2c_read_data(void __iomem *io, int reg) static u32 mlxbf_i2c_read_data(void __iomem *io, int reg)
{ {
return (u32)be32_to_cpu(mlxbf_i2c_read(io, reg)); return ioread32be(io + reg);
} }
/* /*
...@@ -524,7 +524,7 @@ static u32 mlxbf_i2c_read_data(void __iomem *io, int reg) ...@@ -524,7 +524,7 @@ static u32 mlxbf_i2c_read_data(void __iomem *io, int reg)
*/ */
static void mlxbf_i2c_write_data(void __iomem *io, int reg, u32 val) static void mlxbf_i2c_write_data(void __iomem *io, int reg, u32 val)
{ {
mlxbf_i2c_write(io, reg, (u32)cpu_to_be32(val)); iowrite32be(val, io + reg);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment