Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752045Ab0HZRCJ (ORCPT ); Thu, 26 Aug 2010 13:02:09 -0400 Received: from mail.perches.com ([173.55.12.10]:1410 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881Ab0HZRCI (ORCPT ); Thu, 26 Aug 2010 13:02:08 -0400 Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH From: Joe Perches To: Stephen Hemminger Cc: Masayuki Ohtake , LKML , ML netdev , Greg Rose , Maxime Bizon , Kristoffer Glembo , Ralf Baechle , John Linn , Randy Dunlap , "David S. Miller" , MeeGo , "Wang, Qi" , "Wang, Yong Y" , Andrew , Intel OTC , "Foster, Margie" , Toshiharu Okada , Tomoya Morinaga , Takahiro Shimizu In-Reply-To: <20100826092929.72b61549@nehalam> References: <4C763A67.5040107@dsn.okisemi.com> <20100826090504.30ce58e5@nehalam> <1282839372.1875.78.camel@Joe-Laptop> <20100826092929.72b61549@nehalam> Content-Type: text/plain; charset="UTF-8" Date: Thu, 26 Aug 2010 10:02:05 -0700 Message-ID: <1282842125.1875.124.camel@Joe-Laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1252 Lines: 33 On Thu, 2010-08-26 at 09:29 -0700, Stephen Hemminger wrote: > On Thu, 26 Aug 2010 09:16:12 -0700 > Joe Perches wrote: > > My message logging order preference: > > if there's a netif_msg_ and a struct net_device > > netif_ (struct private *, netif_msg_, > > struct net_device *, fmt, args...) > > if there's a struct net_device > > netdev_ (struct net_device *, fmt, args...) > > if there's a struct device > > dev_ (struct device *, fmt, args...) > > otherwise > > pr_ (fmt, args...) > At this point in process, netdevice isn't registered so it > doesn't have a ethX name. so dev_info would be best. Yes, likely true. Ideally netdev_ is used after register_netdev. The default "eth%d" is printed after alloc_netdev but before register_netdev. Before commmit 256df2f3879efdb2e9808bdb1b54b16fbb11fa38 when netdev_s were converted to functions, they would also dereference a NULL pointer if used before register_netdev. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/