]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: ufshcd: Remove VLA usage
authorKees Cook <keescook@chromium.org>
Wed, 2 May 2018 23:58:09 +0000 (16:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 14:36:09 +0000 (10:36 -0400)
commit24f75e106c6b16cf5d152b1ae1c570687cfd56d7
tree065870886eef6ec945d0aa5f7e804c2017102969
parent9a0d76e43d015a25a4cabf51190be4343c4223cc
scsi: ufs: ufshcd: Remove VLA usage

On the quest to remove all VLAs from the kernel[1] this moves buffers
off the stack. In the second instance, this collapses two separately
allocated buffers into a single buffer, since they are used
consecutively, which saves 256 bytes (QUERY_DESC_MAX_SIZE + 1) of stack
space.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c