From: Trond Myklebust Date: Mon, 9 Feb 2015 22:20:14 +0000 (-0500) Subject: SUNRPC: Fix stupid typo in xs_sock_set_reuseport X-Git-Tag: v4.14-rc1~5864^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=402e23b4ed9ed81852b6c15b793fcf84ea91e491;p=platform%2Fkernel%2Flinux-rpi.git SUNRPC: Fix stupid typo in xs_sock_set_reuseport Yes, kernel_setsockopt() hates you for using a char argument. Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 8ab0226..19f7526 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -1629,9 +1629,10 @@ static unsigned short xs_get_random_port(void) */ static void xs_sock_set_reuseport(struct socket *sock) { - char opt = 1; + int opt = 1; - kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt)); + kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, + (char *)&opt, sizeof(opt)); } static unsigned short xs_sock_getport(struct socket *sock)