scsi: device_handler: remove VLAs
authorStephen Kitt <steve@sk2.org>
Fri, 9 Mar 2018 22:32:11 +0000 (23:32 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Mar 2018 02:37:20 +0000 (22:37 -0400)
commit92eb506262a2a3da9aeaece7017e77490da907dd
tree1896ed10ae1166a3a01fe52ead7fd5a21540b872
parente32ec6579f5b3134cb27cc063c17da0bb8cd29c7
scsi: device_handler: remove VLAs

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.

This was prompted by https://lkml.org/lkml/2018/3/7/621

Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/device_handler/scsi_dh_emc.c
drivers/scsi/device_handler/scsi_dh_rdac.c