* [patch] af_packet: remove a stray tab in packet_set_ring()
@ 2014-02-18 12:20 Dan Carpenter
2014-02-18 15:52 ` Daniel Borkmann
2014-02-18 23:02 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-02-18 12:20 UTC (permalink / raw)
To: David S. Miller
Cc: Daniel Borkmann, Willem de Bruijn, Hannes Frederic Sowa,
Eric Dumazet, Phil Sutter, Atzm Watanabe, Richard Cochran, netdev,
kernel-janitors
At first glance it looks like there is a missing curly brace but
actually the code works the same either way. I have adjusted the
indenting but left the code the same.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 6a2bb37506c5..7fd37de503d1 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3786,7 +3786,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
*/
if (!tx_ring)
init_prb_bdqc(po, rb, pg_vec, req_u, tx_ring);
- break;
+ break;
default:
break;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] af_packet: remove a stray tab in packet_set_ring()
2014-02-18 12:20 [patch] af_packet: remove a stray tab in packet_set_ring() Dan Carpenter
@ 2014-02-18 15:52 ` Daniel Borkmann
2014-02-18 23:02 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2014-02-18 15:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: David S. Miller, Willem de Bruijn, Hannes Frederic Sowa,
Eric Dumazet, Phil Sutter, Atzm Watanabe, Richard Cochran, netdev,
kernel-janitors
On 02/18/2014 01:20 PM, Dan Carpenter wrote:
> At first glance it looks like there is a missing curly brace but
> actually the code works the same either way. I have adjusted the
> indenting but left the code the same.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Agreed.
Actually, this whole construct could have been simplified ...
switch (po->tp_version) {
case TPACKET_V3:
/* Transmit path is not supported. We checked
* it above but just being paranoid
*/
if (!tx_ring)
init_prb_bdqc(po, rb, pg_vec, req_u, tx_ring);
break;
default:
break;
}
... into just one if condition. Looks a bit unnecessary as
there's just one case. Feel free to change that as well.
Otherwise ...
Acked-by: Daniel Borkmann <dborkman@redhat.com>
> diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
> index 6a2bb37506c5..7fd37de503d1 100644
> --- a/net/packet/af_packet.c
> +++ b/net/packet/af_packet.c
> @@ -3786,7 +3786,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
> */
> if (!tx_ring)
> init_prb_bdqc(po, rb, pg_vec, req_u, tx_ring);
> - break;
> + break;
> default:
> break;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] af_packet: remove a stray tab in packet_set_ring()
2014-02-18 12:20 [patch] af_packet: remove a stray tab in packet_set_ring() Dan Carpenter
2014-02-18 15:52 ` Daniel Borkmann
@ 2014-02-18 23:02 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-02-18 23:02 UTC (permalink / raw)
To: dan.carpenter
Cc: dborkman, willemb, hannes, edumazet, phil, atzm, richardcochran,
netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 18 Feb 2014 15:20:51 +0300
> At first glance it looks like there is a missing curly brace but
> actually the code works the same either way. I have adjusted the
> indenting but left the code the same.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-18 23:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 12:20 [patch] af_packet: remove a stray tab in packet_set_ring() Dan Carpenter
2014-02-18 15:52 ` Daniel Borkmann
2014-02-18 23:02 ` 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).