From: sfeldma@gmail.com
To: netdev@vger.kernel.org
Cc: jiri@resnulli.us
Subject: [PATCH net-next 2/2] rocker: sparse: fix dynamic allocation on stack warning
Date: Fri, 6 Mar 2015 15:54:52 -0800 [thread overview]
Message-ID: <1425686092-2836-2-git-send-email-sfeldma@gmail.com> (raw)
In-Reply-To: <1425686092-2836-1-git-send-email-sfeldma@gmail.com>
From: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
---
drivers/net/ethernet/rocker/rocker.c | 2 +-
drivers/net/ethernet/rocker/rocker.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 9629352..65e1403 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -2955,7 +2955,7 @@ static int rocker_port_vlan_flood_group(struct rocker_port *rocker_port,
struct rocker_port *p;
struct rocker *rocker = rocker_port->rocker;
u32 group_id = ROCKER_GROUP_L2_FLOOD(vlan_id, 0);
- u32 group_ids[rocker->port_count];
+ u32 group_ids[ROCKER_FP_PORTS_MAX];
u8 group_count = 0;
int err;
int i;
diff --git a/drivers/net/ethernet/rocker/rocker.h b/drivers/net/ethernet/rocker/rocker.h
index 0a94b7c..51e430d 100644
--- a/drivers/net/ethernet/rocker/rocker.h
+++ b/drivers/net/ethernet/rocker/rocker.h
@@ -27,6 +27,8 @@ enum {
ROCKER_ENOBUFS = 105,
};
+#define ROCKER_FP_PORTS_MAX 62
+
#define PCI_VENDOR_ID_REDHAT 0x1b36
#define PCI_DEVICE_ID_REDHAT_ROCKER 0x0006
--
1.7.10.4
next prev parent reply other threads:[~2015-03-06 23:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 23:54 [PATCH net-next 1/2] rocker: quiet sparce endianess warnings sfeldma
2015-03-06 23:54 ` sfeldma [this message]
2015-03-07 3:02 ` [PATCH net-next 2/2] rocker: sparse: fix dynamic allocation on stack warning David Miller
2015-03-07 0:21 ` [PATCH net-next 1/2] rocker: quiet sparce endianess warnings Jonathan Toppins
2015-03-07 3:02 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1425686092-2836-2-git-send-email-sfeldma@gmail.com \
--to=sfeldma@gmail.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).