Skip to contentSkip to conversation

cls_flower: Fix compile error

PATCH Applied Brian Haley 2 participants 2 messages May 14, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 cls_flower: Fix compile error

Fix compile error in net/sched/cls_flower.c

net/sched/cls_flower.c: In function ‘fl_set_key’:
net/sched/cls_flower.c:240:3: error: implicit declaration of
function ‘tcf_change_indev’ [-Werror=implicit-function-declaration]
err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV]);

Introduced in 77b9900ef53ae

Fixes 77b9900ef53ae ("tc: introduce Flower classifier")
net/sched/cls_flower.c +3 -3
index 9bc654c..8c8f34e 100644
@@ -234,15 +234,15 @@ static void fl_set_key_val(struct nlattr **tb,
 static int fl_set_key(struct net *net, struct nlattr **tb,
 		      struct fl_flow_key *key, struct fl_flow_key *mask)
 {
-	int err;
-
+#ifdef CONFIG_NET_CLS_IND
 	if (tb[TCA_FLOWER_INDEV]) {
-		err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV]);
+		int err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV]);
 		if (err < 0)
 			return err;
 		key->indev_ifindex = err;
 		mask->indev_ifindex = 0xffffffff;
 	}
+#endif
 
 	fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST,
 		       mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK,
maintainer Applied
#1 lore raw

From: Brian Haley <[email protected]>
Date: Thu, 14 May 2015 13:20:15 -0400

Quoted 11 lines

Fix compile error in net/sched/cls_flower.c

net/sched/cls_flower.c: In function ‘fl_set_key’:
net/sched/cls_flower.c:240:3: error: implicit declaration of
function ‘tcf_change_indev’ [-Werror=implicit-function-declaration]
err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV]);

Introduced in 77b9900ef53ae

Fixes 77b9900ef53ae ("tc: introduce Flower classifier")

Applied, thanks Brian.