netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dxchgb@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 2/2] packet: minor: make if case unlikely
Date: Tue, 23 Oct 2012 13:58:34 +0200	[thread overview]
Message-ID: <20121023115833.GB8664@thinkbox> (raw)

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;
 	}

             reply	other threads:[~2012-10-23 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 11:58 Daniel Borkmann [this message]
2012-10-23 17:12 ` [PATCH net-next 2/2] packet: minor: make if case unlikely David Miller
2012-10-23 17:22   ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121023115833.GB8664@thinkbox \
    --to=dxchgb@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).