[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303005969.5282.912.camel@localhost>
Date: Sun, 17 Apr 2011 03:06:09 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: David Decotigny <decot@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Alexander Duyck <alexander.h.duyck@...el.com>,
ilon Greenstein <eilong@...adcom.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/5] ethtool: cosmetics: enforce const-ness in
ethtool_cmd_speed
On Sat, 2011-04-16 at 17:54 -0700, David Decotigny wrote:
> The 'ep' argument of ethtool_cmd_speed is not altered: advertise it in
> protoype. +Indentation fix. Also add comments to advise using the
> ethtool_cmd_speed API to get/set the link speed.
>
> Signed-off-by: David Decotigny <decot@...gle.com>
> ---
> include/linux/ethtool.h | 14 ++++++++++----
> 1 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 9de3127..170439e 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -24,7 +24,10 @@ struct ethtool_cmd {
> __u32 cmd;
> __u32 supported; /* Features this interface supports */
> __u32 advertising; /* Features this interface advertises */
> - __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */
> + __u16 speed; /* The forced speed (lower bits): see
> + * SPEED_ macros below. Please use
> + * ethtool_cmd_speed()/_set() to
> + * access it */
[...]
Don't encourage use of the SPEED_* macros. The speed is just a value in
units of Mbit/s.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists