Skip to content

Commit

Permalink
rocker: sparse: fix dynamic allocation on stack warning
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed Mar 7, 2015
1 parent 0f43deb commit 1b5ef07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/rocker/rocker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/rocker/rocker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1b5ef07

Please sign in to comment.