]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: aic7xxx: aic79xx: remove VLAs
authorStephen Kitt <steve@sk2.org>
Thu, 8 Mar 2018 20:51:58 +0000 (21:51 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Mar 2018 04:34:26 +0000 (00:34 -0400)
commit76d29725d4a9bd46670a3356abb220a41634ad75
tree1e570649c35ec871aff5127214a309c82bb4f634
parent0a0673416f84f33d88f0c07e6335948a347583cf
scsi: aic7xxx: aic79xx: remove VLAs

In preparation to enabling -Wvla, remove VLAs and replace them with
fixed-length arrays instead.

The arrays fixed here, using the number of constant sections, aren't
really VLAs, but they appear so to the compiler. Replace the array sizes
with a pre-processor-level constant instead using ARRAY_SIZE.

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

Signed-off-by: Stephen Kitt <steve@sk2.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped
drivers/scsi/aic7xxx/aicasm/aicasm.c