Re: [PATCH] drm/gma500: use ARRAY_SIZE

2017-10-16 Thread Daniel Vetter
On Sun, Oct 15, 2017 at 10:30:46PM -0400, Jérémy Lefaure wrote: > Using the ARRAY_SIZE macro improves the readability of the code. Also, > it is useless to re-invent it. > > Found with Coccinelle with the following semantic patch: > @r depends on (org || report)@ > type T; > T[] E; > position p; >

[PATCH] drm/gma500: use ARRAY_SIZE

2017-10-16 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to re-invent it. 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