From patchwork Tue Nov 15 00:08:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Juhl X-Patchwork-Id: 125635 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1D2BBB71FA for ; Tue, 15 Nov 2011 11:02:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756668Ab1KOACS (ORCPT ); Mon, 14 Nov 2011 19:02:18 -0500 Received: from swampdragon.chaosbits.net ([90.184.90.115]:24891 "EHLO swampdragon.chaosbits.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754777Ab1KOACR (ORCPT ); Mon, 14 Nov 2011 19:02:17 -0500 Received: by swampdragon.chaosbits.net (Postfix, from userid 1000) id 94DD89403D; Tue, 15 Nov 2011 01:08:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by swampdragon.chaosbits.net (Postfix) with ESMTP id 8B9FA9403B; Tue, 15 Nov 2011 01:08:05 +0100 (CET) Date: Tue, 15 Nov 2011 01:08:05 +0100 (CET) From: Jesper Juhl To: David Miller cc: rmallon@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, eric.dumazet@gmail.com, xiaosuo@gmail.com, greearb@candelatech.com, loke.chetan@gmail.com, waltje@uWalt.NL.Mugnet.ORG, gw4pts@gw4pts.ampr.org, waltje@linux.com, ross.biro@gmail.com, alan@linux.intel.com Subject: Re: [PATCH] net/packet: remove dead code and unneeded variable from prb_setup_retire_blk_timer() In-Reply-To: <20111114.184736.1515821968538974735.davem@davemloft.net> Message-ID: References: <20111114.184325.1962580278359413683.davem@davemloft.net> <20111114.184736.1515821968538974735.davem@davemloft.net> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 14 Nov 2011, David Miller wrote: > From: Jesper Juhl > Date: Tue, 15 Nov 2011 00:51:57 +0100 (CET) > > > On Mon, 14 Nov 2011, David Miller wrote: > > > >> From: Jesper Juhl > >> 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 Subject: [PATCH] Revert incorrect dead-code changes to prb_setup_retire_blk_timer Signed-off-by: Jesper Juhl --- 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,