diff mbox

fix net/sched compile error

Message ID 5554CE47.8070709@hp.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Brian Haley May 14, 2015, 4:33 p.m. UTC
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 77b9900ef53ae047e36a37d13a2aa33bb2d60641

Signed-off-by: Brian Haley <brian.haley@hp.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller May 14, 2015, 4:40 p.m. UTC | #1
From: Brian Haley <brian.haley@hp.com>

Date: Thu, 14 May 2015 12:33:11 -0400

> 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 77b9900ef53ae047e36a37d13a2aa33bb2d60641

> 

> Signed-off-by: Brian Haley <brian.haley@hp.com>


Please format your Subject line correctly.

After '[PATCH] ' or similar, you should begin with a subsystem or
driver name prefix, following by a colon character and a space.

In this case, "cls_flower: " would be appropriate.

So something like "[PATCH] cls_flower: Fix compile error."
Sergei Shtylyov May 14, 2015, 7:56 p.m. UTC | #2
Hello.

On 05/14/2015 07:33 PM, Brian Haley wrote:

> 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 77b9900ef53ae047e36a37d13a2aa33bb2d60641

> Signed-off-by: Brian Haley <brian.haley@hp.com>

> diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
> index 9bc654c..8c8f34e 100644
> --- a/net/sched/cls_flower.c
> +++ b/net/sched/cls_flower.c
> @@ -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]);

    Empty line needed here.

>           if (err < 0)
>               return err;
>           key->indev_ifindex = err;
>           mask->indev_ifindex = 0xffffffff;
>       }
> +#endif
[...]

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
index 9bc654c..8c8f34e 100644
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -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,