public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH trivial] mvsas: fix build warning about enum comparisons
@ 2013-05-07 16:57 Kyle McMartin
  2013-05-07 21:20 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle McMartin @ 2013-05-07 16:57 UTC (permalink / raw)
  To: linux-scsi; +Cc: yuxiangl, JBottomley

device_type is a sas_device_type, not a sas_dev_type.

  1 drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo':                                                                             
  2 drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between
'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]           
  3     if (phy->identify.device_type == SAS_END_DEV)                                                                                          
  4                                   ^                                                                                                        
  5 drivers/scsi/mvsas/mv_sas.c:1165:39: warning: comparison between
'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]           
  6     else if (phy->identify.device_type != NO_DEVICE) 

Signed-off-by: Kyle McMartin <kyle@redhat.com>

--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1159,10 +1159,10 @@ void mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st)
 			phy->identify.device_type =
 				phy->att_dev_info & PORT_DEV_TYPE_MASK;
 
-			if (phy->identify.device_type == SAS_END_DEV)
+			if (phy->identify.device_type == SAS_END_DEVICE)
 				phy->identify.target_port_protocols =
 							SAS_PROTOCOL_SSP;
-			else if (phy->identify.device_type != NO_DEVICE)
+			else if (phy->identify.device_type != SAS_PHY_UNUSED)
 				phy->identify.target_port_protocols =
 							SAS_PROTOCOL_SMP;
 			if (oob_done)

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

end of thread, other threads:[~2013-05-08 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 16:57 [PATCH trivial] mvsas: fix build warning about enum comparisons Kyle McMartin
2013-05-07 21:20 ` James Bottomley
2013-05-08 13:49   ` Kyle McMartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox