mlxsw: i2c: Utilize standard macros for dividing buffer into chunks
authorVadim Pasternak <vadimp@nvidia.com>
Fri, 22 Sep 2023 17:18:38 +0000 (19:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Oct 2023 07:07:12 +0000 (08:07 +0100)
commit1f73286371c27cca0fd0094962e480e2b9ef3809
tree646594d9a9e5a04086ea9900751b4f07f37cfe57
parent7afc79e20e22dc3ca552a75665b51b5a93e29632
mlxsw: i2c: Utilize standard macros for dividing buffer into chunks

Use standard macro DIV_ROUND_UP() to determine the number of chunks
required for a given buffer.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/i2c.c