Re: [PATCH v2][next] scsi: mpt3sas: Replace one-element array with flexible-array in struct _MPI2_CONFIG_PAGE_IO_UNIT_3

From: James Bottomley
Date: Mon Mar 08 2021 - 15:13:46 EST


On Mon, 2021-03-08 at 13:32 -0600, Gustavo A. R. Silva wrote:
> Hi all,
>
> Friendly ping: who can review/take this, please?

Well, before embarking on a huge dynamic update, let's ask Broadcom the
simpler question of why isn't MPI2_IO_UNIT_PAGE_3_GPIO_VAL_MAX simply
set to 36? There's no dynamic allocation of anything in the current
code ... it's all hard coded to allocate 36 entries. If there's no
need for anything dynamic then the kzalloc could become

io_unit_pg3 = kzalloc(sizeof(*io_unit_pg3), GFP_KERNEL);

James