diff options
author | Tomas Henzl <thenzl@redhat.com> | 2010-12-22 10:52:40 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-01-03 11:34:15 -0500 |
commit | 474ffb74c75ea9845860ffb24cdc127eda0d5657 (patch) | |
tree | bc1c05ce907a66d029bec0ef5460deb13b929b54 | |
parent | 41511704b678f7b101a76e58d6c6b7bbe2a9ad70 (diff) |
[SCSI] lpfc: lower stack use in lpfc_fc_frame_check
according to checkstack the lpfc_fc_frame_check occupies the first
place in stack usage:
make checkstack
objdump -d vmlinux $(find . -name '*.ko') | \
perl /root/rpmbuild/BUILD/kernel-2.6.32/linux-2.6.32.x86_64/scripts/checkstack.pl x86_64
0x000013f4 lpfc_fc_frame_check [lpfc]: 1936
...
This change makes the rctl_names static, thus not on stack.
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index e98e792ab045..634b2fea9c4d 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -11578,7 +11578,8 @@ lpfc_sli4_post_scsi_sgl_block(struct lpfc_hba *phba, struct list_head *sblist, | |||
11578 | static int | 11578 | static int |
11579 | lpfc_fc_frame_check(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr) | 11579 | lpfc_fc_frame_check(struct lpfc_hba *phba, struct fc_frame_header *fc_hdr) |
11580 | { | 11580 | { |
11581 | char *rctl_names[] = FC_RCTL_NAMES_INIT; | 11581 | /* make rctl_names static to save stack space */ |
11582 | static char *rctl_names[] = FC_RCTL_NAMES_INIT; | ||
11582 | char *type_names[] = FC_TYPE_NAMES_INIT; | 11583 | char *type_names[] = FC_TYPE_NAMES_INIT; |
11583 | struct fc_vft_header *fc_vft_hdr; | 11584 | struct fc_vft_header *fc_vft_hdr; |
11584 | 11585 | ||