linux/drivers/scsi/bfa
Arnd Bergmann 57a6ed0b41 scsi: bfa: Reduce kernel stack usage in bfa_fcs_lport_fdmi_build_portattr_block()
bfa_fcs_fdmi_get_portattr() gets inlined into multiple places and has
two fairly large variables on the stack, to the point of causing a
warning in some randconfig builds:

drivers/scsi/bfa/bfa_fcs_lport.c:2198:1: error: stack frame size (1560) exceeds limit (1280) in 'bfa_fcs_lport_fdmi_build_portattr_block' [-Werror,-Wframe-larger-than]
 2198 | bfa_fcs_lport_fdmi_build_portattr_block(struct bfa_fcs_lport_fdmi_s *fdmi,
      | ^
drivers/scsi/bfa/bfa_fcs_lport.c:1856:1: error: stack frame size (1600) exceeds limit (1280) in 'bfa_fcs_lport_fdmi_build_rhba_pyld' [-Werror,-Wframe-larger-than]
 1856 | bfa_fcs_lport_fdmi_build_rhba_pyld(struct bfa_fcs_lport_fdmi_s *fdmi, u8 *pyld)
      | ^

Mark the inner function as noinline_for_stack to keep it separate from
the other variables and prevent multiple copies of the same variable to
get inlined here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260611125601.3385418-1-arnd@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-06-15 22:01:26 -04:00
..
bfa_core.c scsi: bfa: Remove self-assignment code 2025-09-09 22:57:37 -04:00
bfa_cs.h scsi: bfa: Fix function pointer type mismatch for state machines 2024-02-26 21:16:48 -05:00
bfa_defs_fcs.h scsi: bfa: Remove unused bfa_fcs code 2024-10-15 17:11:55 -04:00
bfa_defs_svc.h scsi: bfa: Fix typo 2021-05-21 17:00:21 -04:00
bfa_defs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_fc.h scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s 2023-08-21 17:13:56 -04:00
bfa_fcbuild.c scsi: bfa: Remove unused parsers 2024-11-20 21:39:51 -05:00
bfa_fcbuild.h scsi: bfa: Remove unused parsers 2024-11-20 21:39:51 -05:00
bfa_fcpim.c scsi: bfa: Remove unused misc code 2024-10-15 17:11:55 -04:00
bfa_fcpim.h scsi: bfa: Remove unused misc code 2024-10-15 17:11:55 -04:00
bfa_fcs_fcpim.c scsi: bfa: Fix function pointer type mismatch for state machines 2024-02-26 21:16:48 -05:00
bfa_fcs_lport.c scsi: bfa: Reduce kernel stack usage in bfa_fcs_lport_fdmi_build_portattr_block() 2026-06-15 22:01:26 -04:00
bfa_fcs_rport.c scsi: bfa: Remove unused bfa_fcs code 2024-10-15 17:11:55 -04:00
bfa_fcs.c scsi: bfa: Update outdated comment 2026-01-04 15:28:08 -05:00
bfa_fcs.h scsi: bfa: Remove unused bfa_fcs code 2024-10-15 17:11:55 -04:00
bfa_hw_cb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_hw_ct.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_ioc_cb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_ioc_ct.c scsi: bfa: Demote non-compliant kerneldoc headers to standard comments 2020-07-24 22:32:07 -04:00
bfa_ioc.c scsi: bfa: Remove unused bfa_ioc code 2024-10-15 17:11:55 -04:00
bfa_ioc.h scsi: bfa: Remove unused bfa_ioc code 2024-10-15 17:11:55 -04:00
bfa_modules.h scsi: bfa: Remove unused bfa_svc code 2024-10-15 17:11:55 -04:00
bfa_plog.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_port.c scsi: bfa: Staticify local functions 2020-07-24 22:31:56 -04:00
bfa_port.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfa_svc.c scsi: bfa: Remove unused bfa_svc code 2024-10-15 17:11:55 -04:00
bfa_svc.h scsi: bfa: Remove unused bfa_svc code 2024-10-15 17:11:55 -04:00
bfa.h scsi: bfa: Remove unused bfa_core code 2024-10-15 17:11:55 -04:00
bfad_attr.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bfad_bsg.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bfad_bsg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfad_debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bfad_drv.h scsi: bfa: Remove unused misc code 2024-10-15 17:11:55 -04:00
bfad_im.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bfad_im.h scsi: bfa: Simplify an alloc_ordered_workqueue() invocation 2024-08-22 21:28:55 -04:00
bfad.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bfi_ms.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfi_reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292 2019-06-05 17:36:38 +02:00
bfi.h scsi: bfa: Fix cacography in bfi.h file 2024-10-03 21:41:37 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00