mbox series

[00/18] use ARRAY_SIZE macro

Message ID 20171001193101.8898-1-jeremy.lefaure@lse.epita.fr
Headers show
Series use ARRAY_SIZE macro | expand

Message

Jérémy Lefaure Oct. 1, 2017, 7:30 p.m. UTC
Hi everyone,
Using ARRAY_SIZE improves the code readability. I used coccinelle (I
made a change to the array_size.cocci file [1]) to find several places
where ARRAY_SIZE could be used instead of other macros or sizeof
division.

I tried to divide the changes into a patch per subsystem (excepted for
staging). If one of the patch should be split into several patches, let
me know.

In order to reduce the size of the To: and Cc: lines, each patch of the
series is sent only to the maintainers and lists concerned by the patch.
This cover letter is sent to every list concerned by this series.

This series is based on linux-next next-20170929. Each patch has been
tested by building the relevant files with W=1.

This series contains the following patches:
[PATCH 01/18] sound: use ARRAY_SIZE
[PATCH 02/18] tracing/filter: use ARRAY_SIZE
[PATCH 03/18] media: use ARRAY_SIZE
[PATCH 04/18] IB/mlx5: Use ARRAY_SIZE
[PATCH 05/18] net: use ARRAY_SIZE
[PATCH 06/18] drm: use ARRAY_SIZE
[PATCH 07/18] scsi: bfa: use ARRAY_SIZE
[PATCH 08/18] ecryptfs: use ARRAY_SIZE
[PATCH 09/18] nfsd: use ARRAY_SIZE
[PATCH 10/18] orangefs: use ARRAY_SIZE
[PATCH 11/18] dm space map metadata: use ARRAY_SIZE
[PATCH 12/18] x86: use ARRAY_SIZE
[PATCH 13/18] tpm: use ARRAY_SIZE
[PATCH 14/18] ipmi: use ARRAY_SIZE
[PATCH 15/18] acpi: use ARRAY_SIZE
[PATCH 16/18] media: staging: atomisp: use ARRAY_SIZE
[PATCH 17/18] staging: rtl8723bs: use ARRAY_SIZE
[PATCH 18/18] staging: rtlwifi: use ARRAY_SIZE


[1]: https://lkml.org/lkml/2017/9/13/689

Comments

Mauro Carvalho Chehab Oct. 2, 2017, 4:37 p.m. UTC | #1
Em Sun, 1 Oct 2017 20:52:20 -0400
Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> escreveu:

> Anyway, I can tell to each maintainer that they can apply the patches
> they're concerned about and next time I may send individual patches.

In the case of media, we'll handle it as if they were individual ones.

Thanks,
Mauro
Zhi Wang Oct. 2, 2017, 5:05 p.m. UTC | #2
Thanks for the patch! :)

2017-10-01 22:30 GMT+03:00 Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>:

> Hi everyone,
> Using ARRAY_SIZE improves the code readability. I used coccinelle (I
> made a change to the array_size.cocci file [1]) to find several places
> where ARRAY_SIZE could be used instead of other macros or sizeof
> division.
>
> I tried to divide the changes into a patch per subsystem (excepted for
> staging). If one of the patch should be split into several patches, let
> me know.
>
> In order to reduce the size of the To: and Cc: lines, each patch of the
> series is sent only to the maintainers and lists concerned by the patch.
> This cover letter is sent to every list concerned by this series.
>
> This series is based on linux-next next-20170929. Each patch has been
> tested by building the relevant files with W=1.
>
> This series contains the following patches:
> [PATCH 01/18] sound: use ARRAY_SIZE
> [PATCH 02/18] tracing/filter: use ARRAY_SIZE
> [PATCH 03/18] media: use ARRAY_SIZE
> [PATCH 04/18] IB/mlx5: Use ARRAY_SIZE
> [PATCH 05/18] net: use ARRAY_SIZE
> [PATCH 06/18] drm: use ARRAY_SIZE
> [PATCH 07/18] scsi: bfa: use ARRAY_SIZE
> [PATCH 08/18] ecryptfs: use ARRAY_SIZE
> [PATCH 09/18] nfsd: use ARRAY_SIZE
> [PATCH 10/18] orangefs: use ARRAY_SIZE
> [PATCH 11/18] dm space map metadata: use ARRAY_SIZE
> [PATCH 12/18] x86: use ARRAY_SIZE
> [PATCH 13/18] tpm: use ARRAY_SIZE
> [PATCH 14/18] ipmi: use ARRAY_SIZE
> [PATCH 15/18] acpi: use ARRAY_SIZE
> [PATCH 16/18] media: staging: atomisp: use ARRAY_SIZE
> [PATCH 17/18] staging: rtl8723bs: use ARRAY_SIZE
> [PATCH 18/18] staging: rtlwifi: use ARRAY_SIZE
>
>
> [1]: https://lkml.org/lkml/2017/9/13/689
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
<div dir="ltr">Thanks for the patch! :)<div class="gmail_extra"><br><div class="gmail_quote">2017-10-01 22:30 GMT+03:00 Jérémy Lefaure <span dir="ltr">&lt;<a href="mailto:jeremy.lefaure@lse.epita.fr" target="_blank">jeremy.lefaure@lse.epita.fr</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
Using ARRAY_SIZE improves the code readability. I used coccinelle (I<br>
made a change to the array_size.cocci file [1]) to find several places<br>
where ARRAY_SIZE could be used instead of other macros or sizeof<br>
division.<br>
<br>
I tried to divide the changes into a patch per subsystem (excepted for<br>
staging). If one of the patch should be split into several patches, let<br>
me know.<br>
<br>
In order to reduce the size of the To: and Cc: lines, each patch of the<br>
series is sent only to the maintainers and lists concerned by the patch.<br>
This cover letter is sent to every list concerned by this series.<br>
<br>
This series is based on linux-next next-20170929. Each patch has been<br>
tested by building the relevant files with W=1.<br>
<br>
This series contains the following patches:<br>
[PATCH 01/18] sound: use ARRAY_SIZE<br>
[PATCH 02/18] tracing/filter: use ARRAY_SIZE<br>
[PATCH 03/18] media: use ARRAY_SIZE<br>
[PATCH 04/18] IB/mlx5: Use ARRAY_SIZE<br>
[PATCH 05/18] net: use ARRAY_SIZE<br>
[PATCH 06/18] drm: use ARRAY_SIZE<br>
[PATCH 07/18] scsi: bfa: use ARRAY_SIZE<br>
[PATCH 08/18] ecryptfs: use ARRAY_SIZE<br>
[PATCH 09/18] nfsd: use ARRAY_SIZE<br>
[PATCH 10/18] orangefs: use ARRAY_SIZE<br>
[PATCH 11/18] dm space map metadata: use ARRAY_SIZE<br>
[PATCH 12/18] x86: use ARRAY_SIZE<br>
[PATCH 13/18] tpm: use ARRAY_SIZE<br>
[PATCH 14/18] ipmi: use ARRAY_SIZE<br>
[PATCH 15/18] acpi: use ARRAY_SIZE<br>
[PATCH 16/18] media: staging: atomisp: use ARRAY_SIZE<br>
[PATCH 17/18] staging: rtl8723bs: use ARRAY_SIZE<br>
[PATCH 18/18] staging: rtlwifi: use ARRAY_SIZE<br>
<br>
<br>
[1]: <a href="https://lkml.org/lkml/2017/9/13/689" rel="noreferrer" target="_blank">https://lkml.org/lkml/2017/9/<wbr>13/689</a><br>
______________________________<wbr>_________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/intel-gfx</a><br>
</blockquote></div><br></div></div>
J. Bruce Fields Oct. 2, 2017, 7:22 p.m. UTC | #3
On Mon, Oct 02, 2017 at 07:35:54AM +0200, Greg KH wrote:
> On Sun, Oct 01, 2017 at 08:52:20PM -0400, Jérémy Lefaure wrote:
> > On Mon, 2 Oct 2017 09:01:31 +1100
> > "Tobin C. Harding" <me@tobin.cc> wrote:
> > 
> > > > In order to reduce the size of the To: and Cc: lines, each patch of the
> > > > series is sent only to the maintainers and lists concerned by the patch.
> > > > This cover letter is sent to every list concerned by this series.  
> > > 
> > > Why don't you just send individual patches for each subsystem? I'm not a maintainer but I don't see
> > > how any one person is going to be able to apply this whole series, it is making it hard for
> > > maintainers if they have to pick patches out from among the series (if indeed any will bother
> > > doing that).
> > Yeah, maybe it would have been better to send individual patches.
> > 
> > From my point of view it's a series because the patches are related (I
> > did a git format-patch from my local branch). But for the maintainers
> > point of view, they are individual patches.
> 
> And the maintainers view is what matters here, if you wish to get your
> patches reviewed and accepted...

Mainly I'd just like to know which you're asking for.  Do you want me to
apply this, or to ACK it so someone else can?  If it's sent as a series
I tend to assume the latter.

But in this case I'm assuming it's the former, so I'll pick up the nfsd
one....

--b.
Jérémy Lefaure Oct. 3, 2017, 1:33 a.m. UTC | #4
On Mon, 2 Oct 2017 15:22:24 -0400
bfields@fieldses.org (J. Bruce Fields) wrote:

> Mainly I'd just like to know which you're asking for.  Do you want me to
> apply this, or to ACK it so someone else can?  If it's sent as a series
> I tend to assume the latter.
> 
> But in this case I'm assuming it's the former, so I'll pick up the nfsd
> one....
Could you to apply the NFSD patch ("nfsd: use ARRAY_SIZE") with the
Reviewed-by: Jeff Layton <jlayton@redhat.com>) tag please ?

This patch is an individual patch and it should not have been sent in a
series (sorry about that).

Thank you,
Jérémy
J. Bruce Fields Oct. 5, 2017, 5:57 p.m. UTC | #5
On Mon, Oct 02, 2017 at 09:33:12PM -0400, Jérémy Lefaure wrote:
> On Mon, 2 Oct 2017 15:22:24 -0400
> bfields@fieldses.org (J. Bruce Fields) wrote:
> 
> > Mainly I'd just like to know which you're asking for.  Do you want me to
> > apply this, or to ACK it so someone else can?  If it's sent as a series
> > I tend to assume the latter.
> > 
> > But in this case I'm assuming it's the former, so I'll pick up the nfsd
> > one....
> Could you to apply the NFSD patch ("nfsd: use ARRAY_SIZE") with the
> Reviewed-by: Jeff Layton <jlayton@redhat.com>) tag please ?
> 
> This patch is an individual patch and it should not have been sent in a
> series (sorry about that).

Applying for 4.15, thanks.--b.