packet: minor: make if case unlikely
Subsystems (3)
PATCH 2/2 packet: minor: make if case unlikely
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.
--- net/packet/af_packet.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/packet/af_packet.c +2 -1
@@ -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; }
David Miller
maintainerFrom: Daniel Borkmann <[email protected]>
Date: Tue, 23 Oct 2012 13:58:34 +0200
Quoted 5 lines
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 <[email protected]>
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.
Quoted 7 lines · David Miller
From: Daniel Borkmann <[email protected]>
Date: Tue, 23 Oct 2012 13:58:34 +0200Quoted 4 lines
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Daniel Borkmann <[email protected]>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.