From: Zhi Yong Wu Date: Tue, 31 Dec 2013 20:31:01 +0000 (+0800) Subject: net, rps: fix build failure when CONFIG_RPS isn't set X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c9d8ca0454a28d0f835138d7294ede4fc6d95572;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net, rps: fix build failure when CONFIG_RPS isn't set In file included from net/socket.c:99:0: include/net/sock.h: In function ‘sock_rps_record_flow’: include/net/sock.h:849:30: error: ‘const struct sock’ has no member named ‘sk_rxhash’ include/net/sock.h: In function ‘sock_rps_reset_flow’: include/net/sock.h:854:29: error: ‘const struct sock’ has no member named ‘sk_rxhash’ Reported-by: Fengguang Wu Signed-off-by: Zhi Yong Wu Signed-off-by: David S. Miller --- diff --git a/include/net/sock.h b/include/net/sock.h index 8ee90add69d2..bd716b6996ff 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 } static inline void sock_rps_save_rxhash(struct sock *sk,