From patchwork Wed Aug 18 20:44:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 62088 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 1335EB70D2 for ; Thu, 19 Aug 2010 06:44:46 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754124Ab0HRUol (ORCPT ); Wed, 18 Aug 2010 16:44:41 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:46291 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753277Ab0HRUoj (ORCPT ); Wed, 18 Aug 2010 16:44:39 -0400 Received: by eyg5 with SMTP id 5so726753eyg.19 for ; Wed, 18 Aug 2010 13:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=2LeLxU09ThODtamPJuVuwc2p62tCGOfceuLDv4I7wrw=; b=aa5sDwhx3bqTavQhGoVvOxNHKvNxzFk5OJ7DaUSVmLfOwfTH4deNV3KWWXQljxK7UR LDY7/a7YCa7f14bHsKeaR/g3aiybd5zaZse0k9Py+BPFlhoRjuxmjBaIAibAqzehhUhn hwgH37r6gs924UO07FMUsTh12vCp6eeVq8EMM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=YLeIh+IvnudU+SejAn3CbZ+d4JR15uCBL30OB5d/TFt4/xEAE3NKVEdNF/joQ+DD5y A7Wu7dIeoUq7oBr3jnI2ifNLKD/SvcSyl0N2jmicVDnSoOABeBNhTvyck4SkfTJdWfiw +WEHzgyc8a3Y6xmAqiGxAG93Awr5425NdFMdY= Received: by 10.216.26.194 with SMTP id c44mr7416251wea.104.1282164278119; Wed, 18 Aug 2010 13:44:38 -0700 (PDT) Received: from [127.0.0.1] ([85.17.35.125]) by mx.google.com with ESMTPS id p42sm520231weq.12.2010.08.18.13.44.35 (version=SSLv3 cipher=RC4-MD5); Wed, 18 Aug 2010 13:44:36 -0700 (PDT) Subject: [PATCH net-next-2.6] atm: remove a net_device_stats clear From: Eric Dumazet To: David Miller Cc: shemminger@vyatta.com, tklauser@distanz.ch, linux@arm.linux.org.uk, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, error27@gmail.com In-Reply-To: <20100818.131043.226780154.davem@davemloft.net> References: <1282061719-19645-1-git-send-email-tklauser@distanz.ch> <1282115064-3701-1-git-send-email-tklauser@distanz.ch> <20100818083304.2ef2eea4@nehalam> <20100818.131043.226780154.davem@davemloft.net> Date: Wed, 18 Aug 2010 22:44:34 +0200 Message-ID: <1282164274.2328.2.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le mercredi 18 août 2010 à 13:10 -0700, David Miller a écrit : > From: Stephen Hemminger > Date: Wed, 18 Aug 2010 08:33:04 -0700 > > > On Wed, 18 Aug 2010 09:04:24 +0200 > > Tobias Klauser wrote: > > > >> > >> - memset (&priv(dev)->stats, 0, sizeof (struct net_device_stats)); > >> + memset(&dev->stats, 0, sizeof(struct net_device_stats)); > > > > This is incorrect, just remove the memset. The stats are initialized > > when device is created. The Linux device driver convention is to > > keep stats when device is set down and brought back up; that is what > > the majority of other drivers do. > > Yep, both the ether1 and ether3 patch have this problem. Looks > like we'll see v4 coming some :-) To be fair, we accepted some bits like that in the past ;) [PATCH net-next-2.6] atm: remove a net_device_stats clear No need to clear device stats in lec_open() Signed-off-by: Eric Dumazet --- net/atm/lec.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/atm/lec.c b/net/atm/lec.c index d98bde1..181d70c 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -220,7 +220,6 @@ static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc) static int lec_open(struct net_device *dev) { netif_start_queue(dev); - memset(&dev->stats, 0, sizeof(struct net_device_stats)); return 0; }