net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
Subsystems (3)
PATCH 1/1 net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
From: Johannes Berg <[email protected]>
There's no point in open-coding sock_valbool_flag().
Signed-off-by Johannes Berg <[email protected]>
--- net/core/sock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
net/core/sock.c +1 -4
@@ -738,10 +738,7 @@ set_rcvbuf:/* We implement the SO_SNDLOWAT etc to not be settable (1003.1g 5.3) */ case SO_RXQ_OVFL : -if (valbool) -sock_set_flag (sk,SOCK_RXQ_OVFL ); -else -sock_reset_flag (sk,SOCK_RXQ_OVFL ); +sock_valbool_flag (sk,SOCK_RXQ_OVFL , valbool);break ;default : ret = -ENOPROTOOPT ;
Quoted 26 lines · Johannes Berg
From: Johannes Berg <[email protected]>
There's no point in open-coding
sock_valbool_flag().Signed-off-by Johannes Berg <[email protected]>--- net/core/sock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)net/core/sock.c +1
-5@@ -738,10 +738,7 @@ set_rcvbuf:/* We implement the SO_SNDLOWAT etc to not be settable (1003.1g 5.3) */ case SO_RXQ_OVFL : -if (valbool) -sock_set_flag (sk,SOCK_RXQ_OVFL ); -else -sock_reset_flag (sk,SOCK_RXQ_OVFL ); +sock_valbool_flag (sk,SOCK_RXQ_OVFL , valbool);break ;default : ret = -ENOPROTOOPT ; --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks good, thanks Johannes!
Acked-by Neil Horman <[email protected]>
From: Neil Horman <[email protected]>
Date: Fri, 7 Oct 2011 09:40:23 -0400
Quoted 6 lines · Johannes Berg
Quoted 5 lines
From: Johannes Berg <[email protected]>
There's no point in open-coding
sock_valbool_flag().Signed-off-by Johannes Berg <[email protected]>
...
Quoted 2 lines
Looks good, thanks Johannes!
Acked-by Neil Horman <[email protected]>
Applied to net-next, thanks.