Skip to content

Commit dfcefb0

Browse files
Cong Wangdavem330
authored andcommitted
net: fix a compile error when CONFIG_NET_LL_RX_POLL is not set
When CONFIG_NET_LL_RX_POLL is not set, I got: net/socket.c: In function ‘sock_poll’: net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration] Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL. Cc: Eliezer Tamir <eliezer.tamir@linux.intel.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b305132 commit dfcefb0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/net/busy_poll.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,10 @@ static inline bool busy_loop_timeout(unsigned long end_time)
181181
return true;
182182
}
183183

184+
static inline bool sk_busy_loop(struct sock *sk, int nonblock)
185+
{
186+
return false;
187+
}
188+
184189
#endif /* CONFIG_NET_LL_RX_POLL */
185190
#endif /* _LINUX_NET_BUSY_POLL_H */

0 commit comments

Comments
 (0)