Skip to content

Commit

Permalink
net_sched: fix a compile warning in act_ife
Browse files Browse the repository at this point in the history
Apparently ife_meta_id2name() is only called when
CONFIG_MODULES is defined.

This fixes:

net/sched/act_ife.c:251:20: warning: ‘ife_meta_id2name’ defined but not used [-Wunused-function]
 static const char *ife_meta_id2name(u32 metaid)
                    ^~~~~~~~~~~~~~~~

Fixes: d3f24ba ("net sched actions: fix module auto-loading")
Cc: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Cong Wang authored and David S. Miller committed Oct 15, 2017
1 parent c116004 commit 6578759
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sched/act_ife.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ static int ife_validate_metatype(struct tcf_meta_ops *ops, void *val, int len)
return ret;
}

#ifdef CONFIG_MODULES
static const char *ife_meta_id2name(u32 metaid)
{
switch (metaid) {
Expand All @@ -261,6 +262,7 @@ static const char *ife_meta_id2name(u32 metaid)
return "unknown";
}
}
#endif

/* called when adding new meta information
* under ife->tcf_lock for existing action
Expand Down

0 comments on commit 6578759

Please sign in to comment.