Address warnings "warning: cast to restricted __be32" reported
by sparse.
Fixes:
b5b5b32081cd206b ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Khalil Blaiech <kblaiech@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
*/
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);
}
/*
*/
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);
}
/*