[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171002043848.GH2031@mtr-leonro.local>
Date: Mon, 2 Oct 2017 07:38:48 +0300
From: Leon Romanovsky <leonro@...lanox.com>
To: Jérémy Lefaure <jeremy.lefaure@....epita.fr>
Cc: Matan Barak <matanb@...lanox.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/18] IB/mlx5: Use ARRAY_SIZE
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@....epita.fr>
> ---
> 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.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists