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>
This commit is contained in:
committed by
Jens Axboe
parent
9f53d2fe81
commit
bca505f109
@@ -4627,7 +4627,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
DAC960_Controller_T *Controller = Command->Controller;
|
DAC960_Controller_T *Controller = Command->Controller;
|
||||||
DAC960_CommandType_T CommandType = Command->CommandType;
|
DAC960_CommandType_T CommandType = Command->CommandType;
|
||||||
DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
|
DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
|
||||||
DAC960_V2_IOCTL_Opcode_T CommandOpcode = CommandMailbox->Common.IOCTL_Opcode;
|
DAC960_V2_IOCTL_Opcode_T IOCTLOpcode = CommandMailbox->Common.IOCTL_Opcode;
|
||||||
|
DAC960_V2_CommandOpcode_T CommandOpcode = CommandMailbox->SCSI_10.CommandOpcode;
|
||||||
DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
|
DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
|
||||||
|
|
||||||
if (CommandType == DAC960_ReadCommand ||
|
if (CommandType == DAC960_ReadCommand ||
|
||||||
@@ -4699,7 +4700,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
{
|
{
|
||||||
if (Controller->ShutdownMonitoringTimer)
|
if (Controller->ShutdownMonitoringTimer)
|
||||||
return;
|
return;
|
||||||
if (CommandOpcode == DAC960_V2_GetControllerInfo)
|
if (IOCTLOpcode == DAC960_V2_GetControllerInfo)
|
||||||
{
|
{
|
||||||
DAC960_V2_ControllerInfo_T *NewControllerInfo =
|
DAC960_V2_ControllerInfo_T *NewControllerInfo =
|
||||||
Controller->V2.NewControllerInformation;
|
Controller->V2.NewControllerInformation;
|
||||||
@@ -4719,14 +4720,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
memcpy(ControllerInfo, NewControllerInfo,
|
memcpy(ControllerInfo, NewControllerInfo,
|
||||||
sizeof(DAC960_V2_ControllerInfo_T));
|
sizeof(DAC960_V2_ControllerInfo_T));
|
||||||
}
|
}
|
||||||
else if (CommandOpcode == DAC960_V2_GetEvent)
|
else if (IOCTLOpcode == DAC960_V2_GetEvent)
|
||||||
{
|
{
|
||||||
if (CommandStatus == DAC960_V2_NormalCompletion) {
|
if (CommandStatus == DAC960_V2_NormalCompletion) {
|
||||||
DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
|
DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
|
||||||
}
|
}
|
||||||
Controller->V2.NextEventSequenceNumber++;
|
Controller->V2.NextEventSequenceNumber++;
|
||||||
}
|
}
|
||||||
else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
|
else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
|
||||||
CommandStatus == DAC960_V2_NormalCompletion)
|
CommandStatus == DAC960_V2_NormalCompletion)
|
||||||
{
|
{
|
||||||
DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
|
DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
|
||||||
@@ -4915,7 +4916,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
NewPhysicalDeviceInfo->LogicalUnit++;
|
NewPhysicalDeviceInfo->LogicalUnit++;
|
||||||
Controller->V2.PhysicalDeviceIndex++;
|
Controller->V2.PhysicalDeviceIndex++;
|
||||||
}
|
}
|
||||||
else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
|
else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
|
||||||
{
|
{
|
||||||
unsigned int DeviceIndex;
|
unsigned int DeviceIndex;
|
||||||
for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
|
for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
|
||||||
@@ -4938,7 +4939,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
}
|
}
|
||||||
Controller->V2.NeedPhysicalDeviceInformation = false;
|
Controller->V2.NeedPhysicalDeviceInformation = false;
|
||||||
}
|
}
|
||||||
else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
|
else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
|
||||||
CommandStatus == DAC960_V2_NormalCompletion)
|
CommandStatus == DAC960_V2_NormalCompletion)
|
||||||
{
|
{
|
||||||
DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
|
DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
|
||||||
@@ -5065,7 +5066,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
|
|||||||
[LogicalDeviceNumber] = true;
|
[LogicalDeviceNumber] = true;
|
||||||
NewLogicalDeviceInfo->LogicalDeviceNumber++;
|
NewLogicalDeviceInfo->LogicalDeviceNumber++;
|
||||||
}
|
}
|
||||||
else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
|
else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
|
||||||
{
|
{
|
||||||
int LogicalDriveNumber;
|
int LogicalDriveNumber;
|
||||||
for (LogicalDriveNumber = 0;
|
for (LogicalDriveNumber = 0;
|
||||||
|
Reference in New Issue
Block a user