Re: [PATCH 04/18] IB/mlx5: Use ARRAY_SIZE

From: Leon Romanovsky
Date: Mon Oct 02 2017 - 00:39:05 EST


On Sun, Oct 01, 2017 at 03:30:42PM -0400, Jérémy Lefaure wrote:
> Using the ARRAY_SIZE macro improves the readability of the code.
>
> Found with Coccinelle with the following semantic patch:
> @r depends on (org || report)@
> type T;
> T[] E;
> position p;
> @@
> (
> (sizeof(E)@p /sizeof(*E))
> |
> (sizeof(E)@p /sizeof(E[...]))
> |
> (sizeof(E)@p /sizeof(T))
> )
>
> Signed-off-by: Jérémy Lefaure <jeremy.lefaure@xxxxxxxxxxxx>
> ---
> drivers/infiniband/hw/mlx5/odp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>

Thanks Jérémy,
I took this into my tree and will forward it to Doug L. during this
cycle.

Attachment: signature.asc
Description: PGP signature