Re: [PATCH 03/18] media: use ARRAY_SIZE

2017-10-02 Thread Michael Ira Krufky
On Sun, Oct 1, 2017 at 3:30 PM, Jérémy Lefaure wrote: > Using the ARRAY_SIZE macro improves the readability of the code. Also, > it is not always useful to use a variable to store this constant > calculated at compile time. > > Found with Coccinelle with the following semantic patch: > @r depends

[PATCH 03/18] media: use ARRAY_SIZE

2017-10-01 Thread Jérémy Lefaure
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p