Skip to contentSkip to conversation

mvsas: fix warnings

PATCH New Stephen Hemminger 1 participant 1 message Jun 6, 2012 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mvsas: fix warnings

This fixes a couple of warnings in the mv_sas device.

drivers/scsi/mvsas/mv_sas.c: In function ‘mvs_task_exec’:
drivers/scsi/mvsas/mv_sas.c:888:24: warning: unused variable ‘dev’ [-Wunused-variable] drivers/scsi/mvsas/mv_sas.c: In function ‘mvs_update_phyinfo’:
drivers/scsi/mvsas/mv_sas.c:1157:34: warning: comparison between ‘enum sas_device_type’ and ‘enum sas_dev_type’ [-Wenum-compare] drivers/scsi/mvsas/mv_sas.c:1160:39: warning: comparison between ‘enum sas_device_type’ and ‘enum sas_dev_type’ [-Wenum-compare]

The first is a trivial unused variable.
The second is a case where a comparison is being done with the incorrect enum. Please review the latter change since it looks like the
original code maybe incorrect.

drivers/scsi/mvsas/mv_sas.c +2 -3
@@ -885,7 +885,6 @@ static int mvs_task_exec(struct sas_task
 				struct completion *completion, int is_tmf,
 				struct mvs_tmf_task *tmf)
 {
-	struct domain_device *dev = task->dev;
 	struct mvs_info *mvi = NULL;
 	u32 rc = 0;
 	u32 pass = 0;
@@ -1154,10 +1153,10 @@ void mvs_update_phyinfo(struct mvs_info
 			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)

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html