public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Roman Mashak <mrv@mojatatu•com>
To: Cong Wang <xiyou.wangcong@gmail•com>
Cc: netdev@vger•kernel.org
Subject: Re: [Patch net-next] net_sched: fix a compile warning in act_ife
Date: Fri, 13 Oct 2017 16:16:51 -0400	[thread overview]
Message-ID: <858tgex0p8.fsf@mojatatu.com> (raw)
In-Reply-To: <20171013195813.25321-1-xiyou.wangcong@gmail.com> (Cong Wang's message of "Fri, 13 Oct 2017 12:58:13 -0700")

Cong Wang <xiyou.wangcong@gmail•com> writes:

> 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)
>                     ^~~~~~~~~~~~~~~~

Fair enough, thanks Cong!

> Fixes: d3f24ba895f0 ("net sched actions: fix module auto-loading")
> Cc: Roman Mashak <mrv@mojatatu•com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail•com>
> ---
>  net/sched/act_ife.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
> index 252ee7d8c731..3007cb1310ea 100644
> --- a/net/sched/act_ife.c
> +++ b/net/sched/act_ife.c
> @@ -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

  reply	other threads:[~2017-10-13 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 19:58 [Patch net-next] net_sched: fix a compile warning in act_ife Cong Wang
2017-10-13 20:16 ` Roman Mashak [this message]
2017-10-15  1:44 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=858tgex0p8.fsf@mojatatu.com \
    --to=mrv@mojatatu$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox