* [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
@ 2011-10-07 13:30 Johannes Berg
2011-10-07 13:40 ` Neil Horman
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2011-10-07 13:30 UTC (permalink / raw)
To: netdev
From: Johannes Berg <johannes.berg@intel.com>
There's no point in open-coding sock_valbool_flag().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/core/sock.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/net/core/sock.c 2011-10-07 15:26:30.000000000 +0200
+++ b/net/core/sock.c 2011-10-07 15:27:46.000000000 +0200
@@ -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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
2011-10-07 13:30 [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL Johannes Berg
@ 2011-10-07 13:40 ` Neil Horman
2011-10-07 17:27 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2011-10-07 13:40 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev
On Fri, Oct 07, 2011 at 03:30:20PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> There's no point in open-coding sock_valbool_flag().
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> net/core/sock.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/net/core/sock.c 2011-10-07 15:26:30.000000000 +0200
> +++ b/net/core/sock.c 2011-10-07 15:27:46.000000000 +0200
> @@ -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;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Looks good, thanks Johannes!
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
2011-10-07 13:40 ` Neil Horman
@ 2011-10-07 17:27 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-10-07 17:27 UTC (permalink / raw)
To: nhorman; +Cc: johannes, netdev
From: Neil Horman <nhorman@tuxdriver.com>
Date: Fri, 7 Oct 2011 09:40:23 -0400
> On Fri, Oct 07, 2011 at 03:30:20PM +0200, Johannes Berg wrote:
>> From: Johannes Berg <johannes.berg@intel.com>
>>
>> There's no point in open-coding sock_valbool_flag().
>>
>> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
...
> Looks good, thanks Johannes!
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-07 17:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 13:30 [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL Johannes Berg
2011-10-07 13:40 ` Neil Horman
2011-10-07 17:27 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).