Re: [PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable

2015-10-07 Thread Chad Dupuis
On Wed, 7 Oct 2015, Maurizio Lombardi wrote: Hi, On 10/07/2015 03:11 PM, Arnd Bergmann wrote: - memset(&npiv_tbl, 0, sizeof(npiv_tbl)); - if (hba->cnic->get_fc_npiv_tbl(hba->cnic, &npiv_tbl)) + npiv_tbl = kzalloc(sizeof(struct cnic_fc_npiv_tbl), GFP_KERNEL); + if (!np

Re: [PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable

2015-10-07 Thread Maurizio Lombardi
Hi, On 10/07/2015 03:11 PM, Arnd Bergmann wrote: > - memset(&npiv_tbl, 0, sizeof(npiv_tbl)); > - if (hba->cnic->get_fc_npiv_tbl(hba->cnic, &npiv_tbl)) > + npiv_tbl = kzalloc(sizeof(struct cnic_fc_npiv_tbl), GFP_KERNEL); > + if (!npiv_tbl) > goto done; > If kzalloc(

[PATCH] bnx2fc: reduce stack usage in __bnx2fc_enable

2015-10-07 Thread Arnd Bergmann
When the bnx2fc driver was changed to read the npiv table from nvram, the stack of the __bnx2fc_enable function gained an additional 1028 byte structure that gcc rightfully warns about: drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function '__bnx2fc_enable': drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2134:1: warn