lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 18 Sep 2013 16:29:01 +0100
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Hauke Mehrtens <hauke@...ke-m.de>, zambrano@...adcom.com,
	netdev <netdev@...r.kernel.org>
Subject: Re: [RFC] b44: use phylib

2013/9/18 Joe Perches <joe@...ches.com>:
> On Sat, 2013-08-24 at 00:56 +0200, Hauke Mehrtens wrote:
>> This splits the driver into the mac and a phy driver. On routers where
>> this driver is used we have a switch which implements a phy and can be
>> controlled by a phy driver.
>
> One more trivial note:
>
>> diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
> []
>> +static void b44_adjust_link(struct net_device *dev)
>> +{
> []
>> +     if (status_changed) {
>> +             pr_info("%s: link %s", dev->name, phydev->link ?
>> +                     "UP" : "DOWN");
>> +             if (phydev->link)
>> +                     pr_cont(" - %d/%s", phydev->speed,
>> +                     phydev->duplex == DUPLEX_FULL ? "full" : "half");
>> +             pr_cont("\n");
>> +     }
>
> This bit would be better as:
>
>         if (status_change) {
>                 if (phydev->link)
>                         netdev_info(dev, "link UP - %d/%s\n",
>                                     phydev->speed,
>                                     phydev->duplex == DUPLEX_FULL
>                                     ? "full" : "half");
>                 else
>                         netdev_info(dev, "link DOWN\n");
>         }

There is a helper function provided by phylib for this: phy_print_status().
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists