Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Joe Perches
On Sun, 2017-09-03 at 21:59 +0200, Thomas Meyer wrote: > On Sun, Sep 03, 2017 at 08:36:02AM -0700, Joe Perches wrote: > > On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > > yourself. > > > > > > Found with:

Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Joe Perches
On Sun, 2017-09-03 at 21:59 +0200, Thomas Meyer wrote: > On Sun, Sep 03, 2017 at 08:36:02AM -0700, Joe Perches wrote: > > On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > > yourself. > > > > > > Found with:

Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Thomas Meyer
On Sun, Sep 03, 2017 at 08:36:02AM -0700, Joe Perches wrote: > On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > yourself. > > > > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > >

Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Thomas Meyer
On Sun, Sep 03, 2017 at 08:36:02AM -0700, Joe Perches wrote: > On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > > yourself. > > > > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > >

Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Joe Perches
On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) >

Re: [PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Joe Perches
On Sun, 2017-09-03 at 14:19 +0200, Thomas Meyer wrote: > Use ARRAY_SIZE macro, rather than explicitly coding some variant of it > yourself. > > Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e > 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) >

[PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Thomas Meyer
Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Run against

[PATCH 0/10] Use ARRAY_SIZE macro - v4.13-rc7

2017-09-03 Thread Thomas Meyer
Use ARRAY_SIZE macro, rather than explicitly coding some variant of it yourself. Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e 's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\) /ARRAY_SIZE(\1)/g' and manual check/verification. Run against