Re: [PATCH] device_handler: remove VLAs
From: Bart Van Assche
Date: Fri Mar 09 2018 - 17:48:19 EST
On Fri, 2018-03-09 at 23:32 +0100, Stephen Kitt wrote:
> In preparation to enabling -Wvla, remove VLAs and replace them with
> fixed-length arrays instead.
>
> scsi_dh_{alua,emc,rdac} use variable-length array declarations to
> store command blocks, with the appropriate size as determined by
> COMMAND_SIZE. This patch replaces these with fixed-sized arrays using
> MAX_COMMAND_SIZE, so that the array size can be determined at compile
> time.
If COMMAND_SIZE() is evaluated at compile time, do we still need this patch?
Thanks,
Bart.