Re: [patch] af_packet: remove a stray tab in packet_set_ring()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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@xxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux