lkml.org 
[lkml]   [2018]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] EDAC, sb_edac: Remove VLA usage
From
Date
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: https://lkml.org/lkml/2018/3/7/621
>>
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>> ---
>>
>> Notice that due to this change, the field max_interleave is no longer
>> used after it has been initialized. Maybe it should be removed?
>
> Yes.
>

I'll remove it then.

>> @@ -110,6 +110,7 @@ static const u32 knl_interleave_list[] = {
>> 0xdc, 0xe4, 0xec, 0xf4, 0xfc, /* 15-19 */
>> 0x104, 0x10c, 0x114, 0x11c, /* 20-23 */
>> };
>> +#define MAX_INTERLEAVE ARRAY_SIZE(knl_interleave_list)
>
> define that as the max of all interleave lists array sizes so that
> people can update it properly when new interleave lists get added.
>

Do you mean just adding a code comment?

Thanks for the feedback.
--
Gustavo

\
 
 \ /
  Last update: 2018-03-12 23:52    [W:0.060 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site