netdev
[Top] [All Lists]

Re: [PATCH] (7/23) sk98: basic ethtool support

To: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] (7/23) sk98: basic ethtool support
From: shemminger@xxxxxxxx
Date: Fri, 12 Nov 2004 20:39:48 -0800 (PST)
Cc: "Stephen Hemminger" <shemminger@xxxxxxxx>, "Jeff Garzik" <jgarzik@xxxxxxxxx>, "Michael Heyse" <mhk@xxxxxxxxxxxxxxxxx>, "Mirko Lindner" <mlindner@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
Importance: Normal
In-reply-to: <20041112162904.GB7066@infradead.org>
References: <4192C60A.1050205@designassembly.de> <20041111154225.5cf85567@zqx3.pdx.osdl.net> <20041111155503.6e0349b8@zqx3.pdx.osdl.net> <20041112162904.GB7066@infradead.org>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: SquirrelMail/1.4.2-1_osdl_00
> On Thu, Nov 11, 2004 at 03:55:03PM -0800, Stephen Hemminger wrote:
>> The basic stuff comes from the newer code from SysKonnect, but I redid
>> it using ethtool_ops and a cleaner way of doing the stats (from e100)
>
>
>> +/*****************************************************************************
>> + *
>> + *  getSettings - retrieves the current settings of the selected
>> adapter
>> + *
>> + * Description:
>> + *  The current configuration of the selected adapter is returned.
>> + *  This configuration involves a)speed, b)duplex and c)autoneg plus
>> + *  a number of other variables.
>> + *
>> + * Returns:    always 0
>> + *
>> + */
>
> Please use normal kernel-doc function documentation.

That was SysKonnect's format, personally I would rather no
comment because this isn't an API for any external usage and
is obvious.

>
>> +static int getSettings(struct net_device *dev, struct ethtool_cmd
>> *ecmd)
>
> And avoid studlyCaps.  Also an sk98lin prefix even on private function
> helps avoiding nameclashes for the generic names (and in the debugger
> or oopses)

I'll just change them to normal kernel format (ie get_settings).
But no, putting prefix's on local obvious functions is a waste.

>> +{
>> +    const DEV_NET *pNet = netdev_priv(dev);
>
> please always use struct net_device instead of strange typedefs for it.

DEV_NET is one of their typedef's (for the driver private data). I prefer
to change them last after all the other patches. Don't want some files
using 'struct s_Devnet' and others using 'DEV_NET', that would be
more confusing.  Eventually DEV_NET will be replaced by something
more descriptive 'struct sk98_port' and AC will be 'struct sk8_board'


<Prev in Thread] Current Thread [Next in Thread>