From: Eric Dumazet Date: Wed, 14 Dec 2011 02:30:00 +0000 (+0000) Subject: cls_flow: remove one dynamic array X-Git-Tag: v3.3-rc1~182^2~217 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=3a53943b5ae8b61913e2d61e98cbeedf67861c92;p=~emulex%2Finfiniband.git cls_flow: remove one dynamic array Its better to use a predefined size for this small automatic variable. Removes a sparse error as well : net/sched/cls_flow.c:288:13: error: bad constant expression Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 51ff19485e1..1d8bd0dbcd1 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c @@ -285,7 +285,7 @@ static int flow_classify(struct sk_buff *skb, const struct tcf_proto *tp, int r; list_for_each_entry(f, &head->filters, list) { - u32 keys[f->nkeys]; + u32 keys[FLOW_KEY_MAX + 1]; struct flow_keys flow_keys; if (!tcf_em_tree_match(skb, &f->ematches, NULL))