All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] packet: minor: make if case unlikely
@ 2012-10-23 11:58 Daniel Borkmann
  2012-10-23 17:12 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Borkmann @ 2012-10-23 11:58 UTC (permalink / raw)
  To: davem; +Cc: netdev

This patch fixes the character width of max. 80 chars and also marks the
if-statement as unlikely since those flags are not supported for the receive
path anyway.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
---
 net/packet/af_packet.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 1f2f465..adb1931 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2601,7 +2601,8 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
 	struct sockaddr_ll *sll;
 	int vnet_hdr_len = 0;
 
-	if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE)) {
+	if (unlikely(flags & ~(MSG_PEEK | MSG_DONTWAIT | MSG_TRUNC |
+			       MSG_CMSG_COMPAT | MSG_ERRQUEUE))) {
 		err = -EINVAL;
 		goto out;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next 2/2] packet: minor: make if case unlikely
  2012-10-23 11:58 [PATCH net-next 2/2] packet: minor: make if case unlikely Daniel Borkmann
@ 2012-10-23 17:12 ` David Miller
  2012-10-23 17:22   ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-10-23 17:12 UTC (permalink / raw)
  To: dxchgb; +Cc: netdev

From: Daniel Borkmann <dxchgb@gmail.com>
Date: Tue, 23 Oct 2012 13:58:34 +0200

> This patch fixes the character width of max. 80 chars and also marks the
> if-statement as unlikely since those flags are not supported for the receive
> path anyway.
> 
> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>

Please, don't submit patches like this.

80 characters is a soft "guidelline" there is no strict requirement
for it.

I'm tossing this entire series.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next 2/2] packet: minor: make if case unlikely
  2012-10-23 17:12 ` David Miller
@ 2012-10-23 17:22   ` Daniel Borkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2012-10-23 17:22 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Tue, Oct 23, 2012 at 7:12 PM, David Miller <davem@davemloft.net> wrote:
> From: Daniel Borkmann <dxchgb@gmail.com>
> Date: Tue, 23 Oct 2012 13:58:34 +0200
>
>> This patch fixes the character width of max. 80 chars and also marks the
>> if-statement as unlikely since those flags are not supported for the receive
>> path anyway.
>>
>> Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
>
> Please, don't submit patches like this.
>
> 80 characters is a soft "guidelline" there is no strict requirement
> for it.

Good to know.

Thanks for the feedback.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-23 17:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-23 11:58 [PATCH net-next 2/2] packet: minor: make if case unlikely Daniel Borkmann
2012-10-23 17:12 ` David Miller
2012-10-23 17:22   ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.