linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds
@ 2016-07-07 13:41 Johannes Thumshirn
       [not found] ` <1467898918-90352-1-git-send-email-jthumshirn-l3A5Bk7waGM@public.gmane.org>
  2016-07-14  2:26 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2016-07-07 13:41 UTC (permalink / raw)
  To: Martin K . Petersen, James Bottomley, Jiri Kosina
  Cc: Linux SCSI Mailinglist, fcoe-devel, Johannes Thumshirn

Use defines from ethtool for 20Gbit and 40Gbit speeds instead of magic
numbers.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/fcoe/fcoe_transport.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index 641c60e..7028dd3 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -133,10 +133,10 @@ int fcoe_link_speed_update(struct fc_lport *lport)
 		case SPEED_10000:
 			lport->link_speed = FC_PORTSPEED_10GBIT;
 			break;
-		case 20000:
+		case SPEED_20000:
 			lport->link_speed = FC_PORTSPEED_20GBIT;
 			break;
-		case 40000:
+		case SPEED_40000:
 			lport->link_speed = FC_PORTSPEED_40GBIT;
 			break;
 		default:
-- 
1.8.5.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds
       [not found] ` <1467898918-90352-1-git-send-email-jthumshirn-l3A5Bk7waGM@public.gmane.org>
@ 2016-07-07 15:34   ` Laurence Oberman
  0 siblings, 0 replies; 3+ messages in thread
From: Laurence Oberman @ 2016-07-07 15:34 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: fcoe-devel-s9riP+hp16TNLxjTenLetw, Jiri Kosina, James Bottomley,
	Linux SCSI Mailinglist, Martin K . Petersen



----- Original Message -----
> From: "Johannes Thumshirn" <jthumshirn-l3A5Bk7waGM@public.gmane.org>
> To: "Martin K . Petersen" <martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>, "James Bottomley" <jejb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>, "Jiri Kosina"
> <trivial-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: "Linux SCSI Mailinglist" <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, fcoe-devel-s9riP+hp16TNLxjTenLetw@public.gmane.org, "Johannes Thumshirn"
> <jthumshirn-l3A5Bk7waGM@public.gmane.org>
> Sent: Thursday, July 7, 2016 9:41:58 AM
> Subject: [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds
> 
> Use defines from ethtool for 20Gbit and 40Gbit speeds instead of magic
> numbers.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn-l3A5Bk7waGM@public.gmane.org>
> ---
>  drivers/scsi/fcoe/fcoe_transport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/fcoe/fcoe_transport.c
> b/drivers/scsi/fcoe/fcoe_transport.c
> index 641c60e..7028dd3 100644
> --- a/drivers/scsi/fcoe/fcoe_transport.c
> +++ b/drivers/scsi/fcoe/fcoe_transport.c
> @@ -133,10 +133,10 @@ int fcoe_link_speed_update(struct fc_lport *lport)
>  		case SPEED_10000:
>  			lport->link_speed = FC_PORTSPEED_10GBIT;
>  			break;
> -		case 20000:
> +		case SPEED_20000:
>  			lport->link_speed = FC_PORTSPEED_20GBIT;
>  			break;
> -		case 40000:
> +		case SPEED_40000:
>  			lport->link_speed = FC_PORTSPEED_40GBIT;
>  			break;
>  		default:
> --
> 1.8.5.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Looks fine, simple change
Reviewed-by: Laurence Oberman <loberman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds
  2016-07-07 13:41 [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds Johannes Thumshirn
       [not found] ` <1467898918-90352-1-git-send-email-jthumshirn-l3A5Bk7waGM@public.gmane.org>
@ 2016-07-14  2:26 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-07-14  2:26 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Martin K . Petersen, James Bottomley, Jiri Kosina,
	Linux SCSI Mailinglist, fcoe-devel

>>>>> "Johannes" == Johannes Thumshirn <jthumshirn@suse.de> writes:

Johannes> Use defines from ethtool for 20Gbit and 40Gbit speeds instead
Johannes> of magic numbers.

Applied to 4.8/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-14  2:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 13:41 [PATCH trivial] fcoe: use defines from ethtool for 20Gbit and 40Gbit speeds Johannes Thumshirn
     [not found] ` <1467898918-90352-1-git-send-email-jthumshirn-l3A5Bk7waGM@public.gmane.org>
2016-07-07 15:34   ` Laurence Oberman
2016-07-14  2:26 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).