]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libfc: Replace one-element arrays with flexible-array members
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 14 Feb 2022 22:39:03 +0000 (16:39 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 28 Feb 2022 02:17:37 +0000 (21:17 -0500)
commitd65f93a535d9944fd0f536e0ea4a809ba264117a
tree06b4b4e747d5074c0be888304465f51e467a3784
parentf1af063ab842b5178135fa022118785791ba67d6
scsi: libfc: Replace one-element arrays with flexible-array members

Use flexible-array members in struct fc_fdmi_attr_entry and fs_fdmi_attrs
instead of one-element arrays, and refactor the code accordingly.

Also, this helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines on
memcpy().

https://github.com/KSPP/linux/issues/79
https://github.com/ClangBuiltLinux/linux/issues/1590

Link: https://lore.kernel.org/r/20220214223903.GA859464@embeddedor
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_encode.h
include/scsi/fc/fc_ms.h