All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [patch net-next-2.6] de2104x: use speed defines instead of number
Date: Wed, 01 Jun 2011 16:46:46 +0100	[thread overview]
Message-ID: <1306943206.22348.10.camel@localhost> (raw)
In-Reply-To: <1306937677-11101-1-git-send-email-jpirko@redhat.com>

The speed/speed_hi fields are defined to hold speed in Mbit/s, not only
specific values.  I don't see any reason to use the names any more.

Ben.

On Wed, 2011-06-01 at 16:14 +0200, Jiri Pirko wrote:
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> ---
>  drivers/net/tulip/de2104x.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
> index e2f6923..1cc426d 100644
> --- a/drivers/net/tulip/de2104x.c
> +++ b/drivers/net/tulip/de2104x.c
> @@ -1507,7 +1507,7 @@ static int __de_get_settings(struct de_private *de, struct ethtool_cmd *ecmd)
>  		break;
>  	}
>  
> -	ethtool_cmd_speed_set(ecmd, 10);
> +	ethtool_cmd_speed_set(ecmd, SPEED_10);
>  
>  	if (dr32(MacMode) & FullDuplex)
>  		ecmd->duplex = DUPLEX_FULL;
> @@ -1529,7 +1529,7 @@ static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd)
>  	u32 new_media;
>  	unsigned int media_lock;
>  
> -	if (ethtool_cmd_speed(ecmd) != 10)
> +	if (ethtool_cmd_speed(ecmd) != SPEED_10)
>  		return -EINVAL;
>  	if (ecmd->duplex != DUPLEX_HALF && ecmd->duplex != DUPLEX_FULL)
>  		return -EINVAL;

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


  reply	other threads:[~2011-06-01 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 14:14 [patch net-next-2.6] de2104x: use speed defines instead of number Jiri Pirko
2011-06-01 15:46 ` Ben Hutchings [this message]
2011-06-01 16:19   ` Jiri Pirko
2011-06-01 17:26     ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306943206.22348.10.camel@localhost \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=jpirko@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.