]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: qla2xxx: Avoid stack frame size warning in qla_dfs
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jun 2025 17:32:22 +0000 (19:32 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Jun 2025 01:12:53 +0000 (21:12 -0400)
commit6243146bb019a200c54a98c96b85f4b9012f2140
treebe2fe48b23ef688df47d1d3f072ed52740660d11
parented575d4bca6ac84129046455803028a91e81cc64
scsi: qla2xxx: Avoid stack frame size warning in qla_dfs

The qla2x00_dfs_tgt_port_database_show() function constructs a fake
fc_port_t object on the stack, which--depending on the configuration--is
large enough to exceed the stack size warning limit:

drivers/scsi/qla2xxx/qla_dfs.c:176:1: error: stack frame size (1392) exceeds limit (1280) in 'qla2x00_dfs_tgt_port_database_show' [-Werror,-Wframe-larger-than]

Rework this function to no longer need the structure but instead call a
custom helper function that just prints the data directly from the
port_database_24xx structure.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250620173232.864179-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_dfs.c
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_mbx.c