[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51ADEEF8.6040503@cogentembedded.com>
Date: Tue, 04 Jun 2013 17:43:20 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Mugunthan V N <mugunthanvnm@...com>
CC: netdev@...r.kernel.org, davem@...emloft.net,
devicetree-discuss@...ts.ozlabs.org, linux-omap@...r.kernel.org,
benoit.cousson@...aro.org, paul@...an.com,
Matus Ujhelyi <ujhelyi.m@...il.com>
Subject: Re: [net-next PATCH 1/8] drivers: net: phy: at803x code cleanup on
register and unregister driver
On 06/04/2013 04:43 PM, Mugunthan V N wrote:
>
>>
>>> Make use of phy_drivers_register/phy_drivers_unregister to
>>> register/unregister
>>> multiple phy drivers in a single module.
>>
>>> Cc: Matus Ujhelyi <ujhelyi.m@...il.com>
>>> Signed-off-by: Mugunthan V N <mugunthanvnm@...com>
>>> ---
>>> drivers/net/phy/at803x.c | 35 ++++++++++-------------------------
>>> 1 file changed, 10 insertions(+), 25 deletions(-)
>>
>>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
>>> index 45cbc10..a1063e1 100644
>>> --- a/drivers/net/phy/at803x.c
>>> +++ b/drivers/net/phy/at803x.c
>>> @@ -108,8 +108,9 @@ static int at803x_config_init(struct phy_device
>>> *phydev)
>>> return 0;
>>> }
>>>
>>> -/* ATHEROS 8035 */
>>> -static struct phy_driver at8035_driver = {
>>> +static struct phy_driver at803x_driver[] = {
>>> +{
>>> + /* ATHEROS 8035 */
>>> .phy_id = 0x004dd072,
>>> .name = "Atheros 8035 ethernet",
>>> .phy_id_mask = 0xffffffef,
>>
>> That's improper indentation. Needs to be shifted by one tab.
> This indentation is as per the coding style followed in all ethernet
> phy drivers. If this need so to be changed, it must be a separate patch
> for all the ethernet phy drivers.
>>
>>> @@ -136,32 +135,18 @@ static struct phy_driver at8030_driver = {
>>> .driver = {
>>> .owner = THIS_MODULE,
>>> },
>>> -};
>>> +} };
>>
>> Looks ugly...
> This is also the same as per the style followed in ethernet phy drivers
> Please refer the below grep output
>
> $ grep -rnaI "} };" drivers/net/phy/*
> drivers/net/phy/at803x.c:201:} };
> drivers/net/phy/bcm63xx.c:101:} };
> drivers/net/phy/bcm87xx.c:217:} };
> drivers/net/phy/broadcom.c:829:} };
> drivers/net/phy/cicada.c:130:} };
> drivers/net/phy/davicom.c:183:} };
> drivers/net/phy/icplus.c:254:} };
> drivers/net/phy/lxt.c:313:} };
> drivers/net/phy/micrel.c:323:} };
> drivers/net/phy/smsc.c:242:} };
> drivers/net/phy/ste10Xp.c:113:} };
> drivers/net/phy/vitesse.c:192:} };
Sorry for the noise, coldn't imagine they're all that bad. :-)
> Regards
> Mugunthan V N
WBR, Sergei
--
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