Commit 1b5ef07e authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

rocker: sparse: fix dynamic allocation on stack warning

Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f43deba
...@@ -2955,7 +2955,7 @@ static int rocker_port_vlan_flood_group(struct rocker_port *rocker_port, ...@@ -2955,7 +2955,7 @@ static int rocker_port_vlan_flood_group(struct rocker_port *rocker_port,
struct rocker_port *p; struct rocker_port *p;
struct rocker *rocker = rocker_port->rocker; struct rocker *rocker = rocker_port->rocker;
u32 group_id = ROCKER_GROUP_L2_FLOOD(vlan_id, 0); 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; u8 group_count = 0;
int err; int err;
int i; int i;
......
...@@ -27,6 +27,8 @@ enum { ...@@ -27,6 +27,8 @@ enum {
ROCKER_ENOBUFS = 105, ROCKER_ENOBUFS = 105,
}; };
#define ROCKER_FP_PORTS_MAX 62
#define PCI_VENDOR_ID_REDHAT 0x1b36 #define PCI_VENDOR_ID_REDHAT 0x1b36
#define PCI_DEVICE_ID_REDHAT_ROCKER 0x0006 #define PCI_DEVICE_ID_REDHAT_ROCKER 0x0006
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment