提交 65787594 编写于 作者: C Cong Wang 提交者: David S. Miller

net_sched: fix a compile warning in act_ife

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: d3f24ba8 ("net sched actions: fix module auto-loading")
Cc: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c116004d
......@@ -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) {
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册