lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 01 Jan 2014 01:03:18 +0300 From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com> To: Zhi Yong Wu <zwu.kernel@...il.com>, netdev@...r.kernel.org CC: davem@...emloft.net, therbert@...gle.com, fengguang.wu@...el.com, Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com> Subject: Re: [net-next bugfix] net, rps: fix build failure when CONFIG_RPS isn't set Hello. On 12/31/2013 11:31 PM, Zhi Yong Wu wrote: > From: Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com> > Reported-by: Fengguang Wu <fengguang.wu@...el.com> > Signed-off-by: Zhi Yong Wu <wuzhy@...ux.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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists