Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-13 Thread Gustavo A. R. Silva
On 03/13/2018 05:48 AM, Borislav Petkov wrote: On Mon, Mar 12, 2018 at 05:52:13PM -0500, Gustavo A. R. Silva wrote: Do you mean just adding a code comment? No, I mean #define MAX_INTERLEAVE (max_t(unsigned int, ARRAY_SIZE(knl_interleave_list), ... which computes the max of all three array

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-13 Thread Gustavo A. R. Silva
On 03/13/2018 05:48 AM, Borislav Petkov wrote: On Mon, Mar 12, 2018 at 05:52:13PM -0500, Gustavo A. R. Silva wrote: Do you mean just adding a code comment? No, I mean #define MAX_INTERLEAVE (max_t(unsigned int, ARRAY_SIZE(knl_interleave_list), ... which computes the max of all three array

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-13 Thread Borislav Petkov
On Mon, Mar 12, 2018 at 05:52:13PM -0500, Gustavo A. R. Silva wrote: > Do you mean just adding a code comment? No, I mean #define MAX_INTERLEAVE (max_t(unsigned int, ARRAY_SIZE(knl_interleave_list), ... which computes the max of all three array sizes. Thx. -- Regards/Gruss, Boris. Good

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-13 Thread Borislav Petkov
On Mon, Mar 12, 2018 at 05:52:13PM -0500, Gustavo A. R. Silva wrote: > Do you mean just adding a code comment? No, I mean #define MAX_INTERLEAVE (max_t(unsigned int, ARRAY_SIZE(knl_interleave_list), ... which computes the max of all three array sizes. Thx. -- Regards/Gruss, Boris. Good

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
Hi Borislav, On 03/10/2018 08:04 AM, Borislav Petkov wrote: On Fri, Mar 09, 2018 at 09:02:18PM -0600, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Fixed as part of the directive to remove all VLAs from the kernel:

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-12 Thread Gustavo A. R. Silva
Hi Borislav, On 03/10/2018 08:04 AM, Borislav Petkov wrote: On Fri, Mar 09, 2018 at 09:02:18PM -0600, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Fixed as part of the directive to remove all VLAs from the kernel:

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-10 Thread Borislav Petkov
On Fri, Mar 09, 2018 at 09:02:18PM -0600, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLA and replace it > with a fixed-length array instead. > > Fixed as part of the directive to remove all VLAs from > the kernel: https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by:

Re: [PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-10 Thread Borislav Petkov
On Fri, Mar 09, 2018 at 09:02:18PM -0600, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLA and replace it > with a fixed-length array instead. > > Fixed as part of the directive to remove all VLAs from > the kernel: https://lkml.org/lkml/2018/3/7/621 > > Signed-off-by:

[PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva --- Notice that due to this change,

[PATCH] EDAC, sb_edac: Remove VLA usage

2018-03-09 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLA and replace it with a fixed-length array instead. Fixed as part of the directive to remove all VLAs from the kernel: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Gustavo A. R. Silva --- Notice that due to this change, the field max_interleave