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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <2D4CFB4B-D8AD-4DF1-A7F0-EFD7C90F1F0E@freescale.com>
Date:	Thu, 3 Apr 2008 15:19:00 -0500
From:	Andy Fleming <afleming@...escale.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
Cc:	netdev@...r.kernel.org, ncase@...-inc.com
Subject: Re: [RFC] Change mii_bus id field to a string


On Apr 3, 2008, at 14:26, Ben Hutchings wrote:

> Andy Fleming wrote:
>> diff --git a/include/linux/phy.h b/include/linux/phy.h
>> index 5e43ae7..92a4829 100644
>> --- a/include/linux/phy.h
>> +++ b/include/linux/phy.h
>> @@ -63,8 +63,6 @@ typedef enum {
>> 	PHY_INTERFACE_MODE_RTBI
>> } phy_interface_t;
>>
>> -#define MII_BUS_MAX 4
>> -
>>
>> #define PHY_INIT_TIMEOUT	100000
>> #define PHY_STATE_TIME		1
>> @@ -74,20 +72,30 @@ typedef enum {
>> #define PHY_MAX_ADDR	32
>>
>> /* Used when trying to connect to a specific phy (mii bus id:phy  
>> device id) */
>> -#define PHY_ID_FMT "%x:%02x"
>> +#define PHY_ID_FMT "%s:%02x"
>> +
>> +/*
>> + * Need to be a little smaller than phydev->dev.bus_id to leave room
>> + * for the ":%02x"
>> + */
>> +#define MII_BUS_ID_SIZE	BUS_ID_SIZE - 3
>
> The macro's definition should be parenthesised.

Agreed.

>
>
>>
>> -/* The Bus class for PHYs.  Devices which provide access to
>> - * PHYs should register using this structure */
>> +/*
>> + * The Bus class for PHYs.  Devices which provide access to
>> + * PHYs should register using this structure
>> + */
>
> I'm not sure why you reformatted this and other comments.  If you  
> really
> think it's necessary to do that, you should probably post a separate  
> patch
> rather than combining it with this functional change.


I reformatted them because the coding standards call for them to be  
formatted differently.  I was aware of that when I wrote them, so I'm  
not sure why I left them like that.  I combined them with this patch  
due to laziness.  I'll separate them out when I resubmit.

Andy
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ