aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-03-02 04:48:32 -0500
committerJens Axboe <axboe@kernel.dk>2012-03-02 04:48:32 -0500
commitbca505f1097c725708ddc055cf8055e922b0904b (patch)
tree09c37d59acfa39a6710d870ff48052ca1d42aa20
parent9f53d2fe815b4011ff930a7b6db98385d45faa68 (diff)
drivers/block/DAC960: fix DAC960_V2_IOCTL_Opcode_T -Wenum-compare warning
Fixed compiler warning: comparison between ‘DAC960_V2_IOCTL_Opcode_T’ and ‘enum <anonymous>’ Renamed enum, added a new enum for SCSI_10.CommandOpcode in DAC960_V2_ProcessCompletedCommand(). Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/block/DAC960.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index e086fbbbe85..487ce64c549 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -4627,7 +4627,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4627 DAC960_Controller_T *Controller = Command->Controller; 4627 DAC960_Controller_T *Controller = Command->Controller;
4628 DAC960_CommandType_T CommandType = Command->CommandType; 4628 DAC960_CommandType_T CommandType = Command->CommandType;
4629 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; 4629 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
4630 DAC960_V2_IOCTL_Opcode_T CommandOpcode = CommandMailbox->Common.IOCTL_Opcode; 4630 DAC960_V2_IOCTL_Opcode_T IOCTLOpcode = CommandMailbox->Common.IOCTL_Opcode;
4631 DAC960_V2_CommandOpcode_T CommandOpcode = CommandMailbox->SCSI_10.CommandOpcode;
4631 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus; 4632 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
4632 4633
4633 if (CommandType == DAC960_ReadCommand || 4634 if (CommandType == DAC960_ReadCommand ||
@@ -4699,7 +4700,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4699 { 4700 {
4700 if (Controller->ShutdownMonitoringTimer) 4701 if (Controller->ShutdownMonitoringTimer)
4701 return; 4702 return;
4702 if (CommandOpcode == DAC960_V2_GetControllerInfo) 4703 if (IOCTLOpcode == DAC960_V2_GetControllerInfo)
4703 { 4704 {
4704 DAC960_V2_ControllerInfo_T *NewControllerInfo = 4705 DAC960_V2_ControllerInfo_T *NewControllerInfo =
4705 Controller->V2.NewControllerInformation; 4706 Controller->V2.NewControllerInformation;
@@ -4719,14 +4720,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4719 memcpy(ControllerInfo, NewControllerInfo, 4720 memcpy(ControllerInfo, NewControllerInfo,
4720 sizeof(DAC960_V2_ControllerInfo_T)); 4721 sizeof(DAC960_V2_ControllerInfo_T));
4721 } 4722 }
4722 else if (CommandOpcode == DAC960_V2_GetEvent) 4723 else if (IOCTLOpcode == DAC960_V2_GetEvent)
4723 { 4724 {
4724 if (CommandStatus == DAC960_V2_NormalCompletion) { 4725 if (CommandStatus == DAC960_V2_NormalCompletion) {
4725 DAC960_V2_ReportEvent(Controller, Controller->V2.Event); 4726 DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
4726 } 4727 }
4727 Controller->V2.NextEventSequenceNumber++; 4728 Controller->V2.NextEventSequenceNumber++;
4728 } 4729 }
4729 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid && 4730 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
4730 CommandStatus == DAC960_V2_NormalCompletion) 4731 CommandStatus == DAC960_V2_NormalCompletion)
4731 { 4732 {
4732 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo = 4733 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
@@ -4915,7 +4916,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4915 NewPhysicalDeviceInfo->LogicalUnit++; 4916 NewPhysicalDeviceInfo->LogicalUnit++;
4916 Controller->V2.PhysicalDeviceIndex++; 4917 Controller->V2.PhysicalDeviceIndex++;
4917 } 4918 }
4918 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid) 4919 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
4919 { 4920 {
4920 unsigned int DeviceIndex; 4921 unsigned int DeviceIndex;
4921 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex; 4922 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
@@ -4938,7 +4939,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4938 } 4939 }
4939 Controller->V2.NeedPhysicalDeviceInformation = false; 4940 Controller->V2.NeedPhysicalDeviceInformation = false;
4940 } 4941 }
4941 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid && 4942 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
4942 CommandStatus == DAC960_V2_NormalCompletion) 4943 CommandStatus == DAC960_V2_NormalCompletion)
4943 { 4944 {
4944 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo = 4945 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
@@ -5065,7 +5066,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
5065 [LogicalDeviceNumber] = true; 5066 [LogicalDeviceNumber] = true;
5066 NewLogicalDeviceInfo->LogicalDeviceNumber++; 5067 NewLogicalDeviceInfo->LogicalDeviceNumber++;
5067 } 5068 }
5068 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid) 5069 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
5069 { 5070 {
5070 int LogicalDriveNumber; 5071 int LogicalDriveNumber;
5071 for (LogicalDriveNumber = 0; 5072 for (LogicalDriveNumber = 0;