linux/drivers/scsi/lpfc
Arnd Bergmann 057959c6e3 scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE
The lpfc_debug_dump_all_queues() function repeatedly calls into
lpfc_debug_dump_qe() which has a temporary 128 byte buffer.  This was fine
before the introduction of CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE because
each instance could occupy the same stack slot. However, now they each get
their own copy, which leads to a huge increase in stack usage as seen from
the compiler warning:

drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debug_dump_all_queues':
drivers/scsi/lpfc/lpfc_debugfs.c:6474:1: error: the frame size of 1712 bytes is larger than 100 bytes [-Werror=frame-larger-than=]

Avoid this by not marking lpfc_debug_dump_qe() as inline so the compiler
can choose to emit a static version of this function when it's needed or
otherwise silently drop it. As an added benefit, not inlining multiple
copies of this function means we save several kilobytes of .text section,
reducing the file size from 47kb to 43.

It is somewhat unusual to have a function that is static but not inline in
a header file, but this does not cause problems here because it is only
used by other inline functions. It would however seem reasonable to move
all the lpfc_debug_dump_* functions into lpfc_debugfs.c and not mark them
inline as a later cleanup.

Fixes: 81a56f6dcd ("gcc-plugins: structleak: Generalize to all variable types")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-07-11 20:42:30 -04:00
..
lpfc_attr.c scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors 2019-06-18 19:46:22 -04:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c scsi: lpfc: Fix incorrect logical link speed on trunks when links down 2019-06-18 19:46:21 -04:00
lpfc_bsg.h scsi: lpfc: Update Copyright in driver version 2019-03-19 13:15:10 -04:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Separate CQ processing for nvmet_fc upcalls 2019-06-18 19:46:21 -04:00
lpfc_ct.c scsi: lpfc: Fix FDMI fc4type for nvme support 2019-06-18 19:46:22 -04:00
lpfc_debugfs.c scsi: lpfc: change snprintf to scnprintf for possible overflow 2019-03-25 22:14:16 -04:00
lpfc_debugfs.h scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE 2019-07-11 20:42:30 -04:00
lpfc_disc.h scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_els.c scsi: lpfc: Fix PT2PT PLOGI collison stopping discovery 2019-06-18 19:46:21 -04:00
lpfc_hbadisc.c scsi: scsi_transport_fc: nvme: display FC-NVMe port roles 2019-04-12 20:09:34 -04:00
lpfc_hw4.h scsi: lpfc: Move trunk_errmsg[] from a header file into a .c file 2019-04-03 23:11:36 -04:00
lpfc_hw.h scsi: lpfc: add support for posting FC events on FPIN reception 2019-04-08 21:29:16 -04:00
lpfc_ids.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_init.c scsi: lpfc: Make some symbols static 2019-06-18 19:46:24 -04:00
lpfc_logmsg.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_mbox.c SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_mem.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Remove set-but-not-used variables 2019-04-03 23:11:36 -04:00
lpfc_nvme.c scsi: lpfc: Revise message when stuck due to unresponsive adapter 2019-06-18 19:46:21 -04:00
lpfc_nvme.h SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_nvmet.c Merge branch '5.3/scsi-sg' into scsi-next 2019-06-27 00:19:33 -04:00
lpfc_nvmet.h scsi: lpfc: Fix nvmet handling of received ABTS for unmapped frames 2019-06-18 19:46:21 -04:00
lpfc_scsi.c scsi: lpfc: Fix fcp_rsp_len checking on lun reset 2019-06-18 19:46:22 -04:00
lpfc_scsi.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli4.h scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors 2019-06-18 19:46:22 -04:00
lpfc_sli.c scsi: lpfc: Make some symbols static 2019-06-18 19:46:24 -04:00
lpfc_sli.h scsi: lpfc: Coordinate adapter error handling with offline handling 2019-03-19 12:57:02 -04:00
lpfc_version.h scsi: lpfc: Update lpfc version to 12.2.0.3 2019-06-18 19:46:22 -04:00
lpfc_vport.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_vport.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc.h scsi: lpfc: Correct boot bios information to FDMI registration 2019-03-19 13:15:09 -04:00
Makefile scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00