lkml.org 
[lkml]   [2010]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Gigabit Ethernet driver of Topcliff PCH
On Thu, 26 Aug 2010 09:16:12 -0700
Joe Perches <joe@perches.com> wrote:

> On Thu, 2010-08-26 at 09:05 -0700, Stephen Hemminger wrote:
> > + for (i = 0; i < 6; i++)
> > + printk(KERN_INFO "%2.2x%c",
> > + netdev->dev_addr[i], i == 5 ? '\n' : ':');
> >
> > you just want:
> > printk(KERN_INFO "%pM", netdev->dev_addr);
> >
> > or better yet, convert to dev_printk
>
> or perhaps better still convert to netdev_info
>
> My message logging order preference:
>
> if there's a netif_msg_<type> and a struct net_device
> netif_<level> (struct private *, netif_msg_<type>,
> struct net_device *, fmt, args...)
> if there's a struct net_device
> netdev_<level> (struct net_device *, fmt, args...)
> if there's a struct device
> dev_<level> (struct device *, fmt, args...)
> otherwise
> pr_<level> (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.

--


\
 
 \ /
  Last update: 2010-08-26 18:31    [W:0.066 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site