Re: [PATCH] net/packet: remove dead code and unneeded variable fromprb_setup_retire_blk_timer()

From: Jesper Juhl
Date: Mon Nov 14 2011 - 19:02:17 EST


On Mon, 14 Nov 2011, David Miller wrote:

> From: Jesper Juhl <jj@xxxxxxxxxxxxx>
> Date: Tue, 15 Nov 2011 00:51:57 +0100 (CET)
>
> > On Mon, 14 Nov 2011, David Miller wrote:
> >
> >> From: Jesper Juhl <jj@xxxxxxxxxxxxx>
> >> Date: Tue, 15 Nov 2011 00:37:33 +0100 (CET)
> >>
> >> > David: You may want to pass on this one. I obviously didn't think it
> >> > through properly - sorry :-(
> >>
> >> It's already in my tree and pushed out to kernel.org, what in the
> >> world do you think "applied" means?
> >>
> > I'm sorry about that. I try to be careful with my patches, but sometimes
> > mistakes slip through - I'm only human... I do my best, but I mess up
> > sometimes and Ryan raised a good point that I had not considered when I
> > prepared the patch - what would you have me do except reply to his mail as
> > I did?
>
> Send a patch to fix things back up.

Sure, I can do that. Please see below.

I'm sorry about thiss mess and the extra work it caused you - I'll be more
careful in the future.


From: Jesper Juhl <jj@xxxxxxxxxxxxx>
Subject: [PATCH] Revert incorrect dead-code changes to prb_setup_retire_blk_timer

Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
---
net/packet/af_packet.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ab10e84..82a6f34 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -516,11 +516,13 @@ static void prb_init_blk_timer(struct packet_sock *po,

static void prb_setup_retire_blk_timer(struct packet_sock *po, int tx_ring)
{
+ struct tpacket_kbdq_core *pkc;
+
if (tx_ring)
BUG();

- prb_init_blk_timer(po, &po->rx_ring.prb_bdqc,
- prb_retire_rx_blk_timer_expired);
+ pkc = tx_ring ? &po->tx_ring.prb_bdqc : &po->rx_ring.prb_bdqc;
+ prb_init_blk_timer(po, pkc, prb_retire_rx_blk_timer_expired);
}

static int prb_calc_retire_blk_tmo(struct packet_sock *po,
--
1.7.7.3

--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/