Skip to content

Commit

Permalink
scsi: smartpqi: Replace one-element arrays with flexible-array members
Browse files Browse the repository at this point in the history
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in structures report_phys_lun_8byte_wwid_list and
report_phys_lun_16byte_wwid_list.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy().

Link: KSPP#79
Link: KSPP#204
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
  • Loading branch information
GustavoARSilva authored and intel-lab-lkp committed Sep 22, 2022
1 parent 1ac46d1 commit 62cb287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/smartpqi/smartpqi.h
Expand Up @@ -982,12 +982,12 @@ struct report_phys_lun_16byte_wwid {

struct report_phys_lun_8byte_wwid_list {
struct report_lun_header header;
struct report_phys_lun_8byte_wwid lun_entries[1];
struct report_phys_lun_8byte_wwid lun_entries[];
};

struct report_phys_lun_16byte_wwid_list {
struct report_lun_header header;
struct report_phys_lun_16byte_wwid lun_entries[1];
struct report_phys_lun_16byte_wwid lun_entries[];
};

struct raid_map_disk_data {
Expand Down

0 comments on commit 62cb287

Please sign in to comment.