Re: [PATCH v2] btrfs: Use sizeof directly instead of a constant variable

2018-03-14 Thread David Sterba
On Tue, Mar 13, 2018 at 10:26:06AM +0200, Nikolay Borisov wrote: > The kernel would like to have all stack VLA usage removed[1]. > Unfortunately using an integer constant variable as the size of an > array is still considered a VLA. Instead let's use directly sizeof(var) > which removes the VLA

[PATCH v2] btrfs: Use sizeof directly instead of a constant variable

2018-03-13 Thread Nikolay Borisov
The kernel would like to have all stack VLA usage removed[1]. Unfortunately using an integer constant variable as the size of an array is still considered a VLA. Instead let's use directly sizeof(var) which removes the VLA usage. Use the occasion to remove csum_size altogether and use sizeof()