From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Zhi Yong Wu <zwu.kernel@gmail.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, therbert@google.com, fengguang.wu@intel.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [net-next bugfix] net, rps: fix build failure when CONFIG_RPS isn't set
Date: Wed, 01 Jan 2014 01:03:18 +0300 [thread overview]
Message-ID: <52C33F26.8070609@cogentembedded.com> (raw)
In-Reply-To: <1388521861-17410-1-git-send-email-zwu.kernel@gmail.com>
Hello.
On 12/31/2013 11:31 PM, Zhi Yong Wu wrote:
> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> ---
> include/net/sock.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
> diff --git a/include/net/sock.h b/include/net/sock.h
> index 8ee90ad..bd716b6 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -846,12 +846,16 @@ static inline void sock_rps_reset_flow_hash(__u32 hash)
>
> static inline void sock_rps_record_flow(const struct sock *sk)
> {
> +#ifdef CONFIG_RPS
> sock_rps_record_flow_hash(sk->sk_rxhash);
> +#endif
> }
>
> static inline void sock_rps_reset_flow(const struct sock *sk)
> {
> +#ifdef CONFIG_RPS
> sock_rps_reset_flow_hash(sk->sk_rxhash);
> +#endif
> }
A lot better style would be:
+#ifdef CONFIG_RPS
static inline void sock_rps_reset_flow(const struct sock *sk)
{
sock_rps_reset_flow_hash(sk->sk_rxhash);
}
#else
static inline void sock_rps_reset_flow(const struct sock *sk) {}
+#endif
WBR, Sergei
next prev parent reply other threads:[~2013-12-31 21:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 20:31 [net-next bugfix] net, rps: fix build failure when CONFIG_RPS isn't set Zhi Yong Wu
2013-12-31 20:54 ` David Miller
2013-12-31 20:58 ` David Miller
2014-01-01 6:36 ` Zhi Yong Wu
2013-12-31 22:03 ` Sergei Shtylyov [this message]
2013-12-31 21:08 ` David Miller
2013-12-31 21:08 ` 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=52C33F26.8070609@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=wuzhy@linux.vnet.ibm.com \
--cc=zwu.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.