* [PATCH] cxgb4: Fix frame size warning for 32 bit arch
@ 2015-03-25 14:31 Hariprasad Shenai
2015-03-25 15:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Shenai @ 2015-03-25 14:31 UTC (permalink / raw)
To: netdev; +Cc: davem, leedom, anish, nirranjan, kumaras, swise,
Hariprasad Shenai
Fixes below warning by dynamically allocating memory
All warnings:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c: In function
'cctrl_tbl_show':
>> drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:689:1: warning: the
>> frame
>> size of 1028 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
index 0918c16..f0285bc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
@@ -670,9 +670,13 @@ static int cctrl_tbl_show(struct seq_file *seq, void *v)
"0.9375" };
int i;
- u16 incr[NMTUS][NCCTRL_WIN];
+ u16 (*incr)[NCCTRL_WIN];
struct adapter *adap = seq->private;
+ incr = kmalloc(sizeof(*incr) * NMTUS, GFP_KERNEL);
+ if (!incr)
+ return -ENOMEM;
+
t4_read_cong_tbl(adap, incr);
for (i = 0; i < NCCTRL_WIN; ++i) {
@@ -685,6 +689,8 @@ static int cctrl_tbl_show(struct seq_file *seq, void *v)
adap->params.a_wnd[i],
dec_fac[adap->params.b_wnd[i]]);
}
+
+ kfree(incr);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb4: Fix frame size warning for 32 bit arch
2015-03-25 14:31 [PATCH] cxgb4: Fix frame size warning for 32 bit arch Hariprasad Shenai
@ 2015-03-25 15:45 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-03-25 15:45 UTC (permalink / raw)
To: hariprasad; +Cc: netdev, leedom, anish, nirranjan, kumaras, swise
From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed, 25 Mar 2015 20:01:26 +0530
> Fixes below warning by dynamically allocating memory
>
> All warnings:
>
> drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c: In function
> 'cctrl_tbl_show':
> >> drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c:689:1: warning: the
> >> frame
> >> size of 1028 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-25 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 14:31 [PATCH] cxgb4: Fix frame size warning for 32 bit arch Hariprasad Shenai
2015-03-25 15:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).