From: Daniel Borkmann <dborkman@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
Eric Dumazet <edumazet@google.com>, Phil Sutter <phil@nwl.cc>,
Atzm Watanabe <atzm@stratosphere.co.jp>,
Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] af_packet: remove a stray tab in packet_set_ring()
Date: Tue, 18 Feb 2014 16:52:15 +0100 [thread overview]
Message-ID: <530381AF.7090409@redhat.com> (raw)
In-Reply-To: <20140218122050.GB9604@elgon.mountain>
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;
> }
>
next prev parent reply other threads:[~2014-02-18 15:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-02-18 23:02 ` David Miller
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=530381AF.7090409@redhat.com \
--to=dborkman@redhat.com \
--cc=atzm@stratosphere.co.jp \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=richardcochran@gmail.com \
--cc=willemb@google.com \
/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).