1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Remove explicit CC assignment in isci(4) Makefile to allow for building

with clang.  Also fix a number of warnings uncovered when building with
clang around some implicit enum conversions.

Sponsored by: Intel
Approved by: scottl
This commit is contained in:
Jim Harris 2012-02-09 17:50:24 +00:00
parent 6303ae4d5c
commit 0f2a8452df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231296
13 changed files with 36 additions and 33 deletions

View File

@ -160,7 +160,6 @@ struct ISCI_REQUEST
struct ISCI_IO_REQUEST
{
struct ISCI_REQUEST parent;
SCI_STATUS status;
SCI_IO_REQUEST_HANDLE_T sci_object;
union ccb *ccb;
uint32_t num_segments;

View File

@ -626,16 +626,16 @@ isci_io_request_construct(void *arg, bus_dma_segment_t *seg, int nseg,
return;
}
io_request->status = scif_io_request_construct(
status = scif_io_request_construct(
io_request->parent.controller_handle,
io_request->parent.remote_device_handle,
SCI_CONTROLLER_INVALID_IO_TAG, (void *)io_request,
(void *)((char*)io_request + sizeof(struct ISCI_IO_REQUEST)),
&io_request->sci_object);
if (io_request->status != SCI_SUCCESS) {
if (status != SCI_SUCCESS) {
isci_io_request_complete(io_request->parent.controller_handle,
device, io_request, io_request->status);
device, io_request, (SCI_IO_STATUS)status);
return;
}
@ -650,7 +650,7 @@ isci_io_request_construct(void *arg, bus_dma_segment_t *seg, int nseg,
if (status != SCI_SUCCESS) {
isci_io_request_complete(io_request->parent.controller_handle,
device, io_request, status);
device, io_request, (SCI_IO_STATUS)status);
return;
}
@ -900,7 +900,7 @@ isci_io_request_execute_smp_io(union ccb *ccb,
if (status != SCI_SUCCESS) {
isci_io_request_complete(controller->scif_controller_handle,
smp_device_handle, io_request, status);
smp_device_handle, io_request, (SCI_IO_STATUS)status);
return;
}
@ -912,7 +912,7 @@ isci_io_request_execute_smp_io(union ccb *ccb,
if (status != SCI_SUCCESS) {
isci_io_request_complete(controller->scif_controller_handle,
smp_device_handle, io_request, status);
smp_device_handle, io_request, (SCI_IO_STATUS)status);
return;
}

View File

@ -195,7 +195,7 @@ isci_remote_device_reset(struct ISCI_REMOTE_DEVICE *remote_device,
if (status != SCI_SUCCESS) {
isci_task_request_complete(controller->scif_controller_handle,
remote_device->sci_object, task_request->sci_object,
status);
(SCI_TASK_STATUS)status);
return;
}
@ -207,7 +207,7 @@ isci_remote_device_reset(struct ISCI_REMOTE_DEVICE *remote_device,
isci_task_request_complete(
controller->scif_controller_handle,
remote_device->sci_object, task_request->sci_object,
status);
(SCI_TASK_STATUS)status);
return;
}
}

View File

@ -124,8 +124,8 @@ SATI_STATUS sati_abort_task_set_translate_data(
for (tag_index = 0; tag_index < 32; tag_index++)
{
void * matching_command;
SCI_STATUS completion_status;
void * matching_command;
SCI_IO_STATUS completion_status;
sati_cb_device_get_request_by_ncq_tag(
scsi_task,
tag_index,
@ -141,7 +141,7 @@ SATI_STATUS sati_abort_task_set_translate_data(
)
{
sati_translate_error(sequence, matching_command, log->error);
completion_status = SCI_FAILURE_IO_RESPONSE_VALID;
completion_status = SCI_IO_FAILURE_RESPONSE_VALID;
if(sequence->state == SATI_SEQUENCE_STATE_READ_ERROR)
{
@ -159,7 +159,7 @@ SATI_STATUS sati_abort_task_set_translate_data(
}
else
{
completion_status = SCI_FAILURE_IO_TERMINATED;
completion_status = SCI_IO_FAILURE_TERMINATED;
}
sati_cb_io_request_complete(matching_command, completion_status);

View File

@ -4165,7 +4165,7 @@ SCI_IO_STATUS scic_controller_start_io(
U16 io_tag
)
{
SCI_IO_STATUS status;
SCI_STATUS status;
SCIC_SDS_CONTROLLER_T *this_controller;
this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
@ -4183,7 +4183,7 @@ SCI_IO_STATUS scic_controller_start_io(
io_tag
);
return status;
return (SCI_IO_STATUS)status;
}
// ---------------------------------------------------------------------------
@ -4253,7 +4253,7 @@ SCI_TASK_STATUS scic_controller_start_task(
U16 task_tag
)
{
SCI_TASK_STATUS status = SCI_FAILURE_INVALID_STATE;
SCI_STATUS status = SCI_FAILURE_INVALID_STATE;
SCIC_SDS_CONTROLLER_T *this_controller;
this_controller = (SCIC_SDS_CONTROLLER_T *)controller;
@ -4282,7 +4282,7 @@ SCI_TASK_STATUS scic_controller_start_task(
));
}
return status;
return (SCI_TASK_STATUS)status;
}
// ---------------------------------------------------------------------------

View File

@ -271,6 +271,7 @@ SCI_IO_STATUS scif_controller_start_io(
)
{
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
SCI_STATUS status;
SCIF_LOG_TRACE((
sci_base_object_get_logger(controller),
@ -284,7 +285,7 @@ SCI_IO_STATUS scif_controller_start_io(
|| scif_sas_controller_sufficient_resource(controller)
)
{
return fw_controller->state_handlers->start_io_handler(
status = fw_controller->state_handlers->start_io_handler(
(SCI_BASE_CONTROLLER_T*) controller,
(SCI_BASE_REMOTE_DEVICE_T*) remote_device,
(SCI_BASE_REQUEST_T*) io_request,
@ -292,7 +293,9 @@ SCI_IO_STATUS scif_controller_start_io(
);
}
else
return SCI_FAILURE_INSUFFICIENT_RESOURCES;
status = SCI_FAILURE_INSUFFICIENT_RESOURCES;
return (SCI_IO_STATUS)status;
}
// ---------------------------------------------------------------------------
@ -305,13 +308,14 @@ SCI_TASK_STATUS scif_controller_start_task(
)
{
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
SCI_STATUS status;
// Validate the user supplied parameters.
if ( (controller == SCI_INVALID_HANDLE)
|| (remote_device == SCI_INVALID_HANDLE)
|| (task_request == SCI_INVALID_HANDLE) )
{
return SCI_FAILURE_INVALID_PARAMETER_VALUE;
return SCI_TASK_FAILURE_INVALID_PARAMETER_VALUE;
}
SCIF_LOG_TRACE((
@ -323,7 +327,7 @@ SCI_TASK_STATUS scif_controller_start_task(
if (scif_sas_controller_sufficient_resource(controller))
{
return fw_controller->state_handlers->start_task_handler(
status = fw_controller->state_handlers->start_task_handler(
(SCI_BASE_CONTROLLER_T*) controller,
(SCI_BASE_REMOTE_DEVICE_T*) remote_device,
(SCI_BASE_REQUEST_T*) task_request,
@ -331,7 +335,9 @@ SCI_TASK_STATUS scif_controller_start_task(
);
}
else
return SCI_FAILURE_INSUFFICIENT_RESOURCES;
status = SCI_FAILURE_INSUFFICIENT_RESOURCES;
return (SCI_TASK_STATUS)status;
}
// ---------------------------------------------------------------------------

View File

@ -586,7 +586,7 @@ SCI_STATUS scif_sas_controller_ready_start_io_handler(
if (status == SCI_SUCCESS)
{
// Ask the core to start processing for this IO request.
status = scic_controller_start_io(
status = (SCI_STATUS)scic_controller_start_io(
fw_controller->core_object,
fw_device->core_object,
fw_io->parent.core_object,
@ -903,7 +903,7 @@ SCI_STATUS scif_sas_controller_ready_start_task_handler(
}
// Ask the core to start processing for this task request.
status = scic_controller_start_task(
status = (SCI_STATUS)scic_controller_start_task(
fw_controller->core_object,
fw_device->core_object,
fw_task->parent.core_object,
@ -1072,7 +1072,7 @@ SCI_STATUS scif_sas_controller_common_start_high_priority_io_handler(
if (status == SCI_SUCCESS)
{
// Ask the core to start processing for this IO request.
status = scic_controller_start_io(
status = (SCI_STATUS)scic_controller_start_io(
fw_controller->core_object,
fw_device->core_object,
fw_io->parent.core_object,
@ -1683,7 +1683,7 @@ SCI_STATUS scif_sas_controller_failed_state_start_io_handler(
&((SCIF_SAS_CONTROLLER_T *)controller)->parent.state_machine)
));
return SCI_IO_FAILURE;
return SCI_FAILURE;
}
#define scif_sas_controller_stopping_complete_io_handler \

View File

@ -811,7 +811,7 @@ SCI_STATUS scif_sas_io_request_continue(
);
//start the new constructed IO.
return scif_controller_start_io(
return (SCI_STATUS)scif_controller_start_io(
(SCI_CONTROLLER_HANDLE_T) fw_controller,
(SCI_REMOTE_DEVICE_HANDLE_T) fw_device,
(SCI_IO_REQUEST_HANDLE_T) fw_request,

View File

@ -255,7 +255,7 @@ void scif_sas_remote_device_ready_ncq_error_substate_enter(
}
}
status = scif_controller_start_task(
scif_controller_start_task(
fw_controller,
fw_device,
fw_request,

View File

@ -1853,7 +1853,7 @@ void scif_sas_smp_remote_device_terminated_request_handler(
));
scif_sas_smp_remote_device_decode_smp_response(
fw_device, fw_request, NULL, SCI_FAILURE_RETRY_REQUIRED
fw_device, fw_request, NULL, SCI_IO_FAILURE_RETRY_REQUIRED
);
}

View File

@ -396,7 +396,7 @@ SCI_STATUS scif_sas_stp_io_request_construct(
fw_io->parent.protocol_complete_handler
= scif_sas_stp_core_cb_io_request_complete_handler;
// Done with translation
sci_status = SATI_SUCCESS;
sci_status = SCI_SUCCESS;
}
else if (sati_status == SATI_COMPLETE)
sci_status = SCI_SUCCESS_IO_COMPLETE_BEFORE_START;

View File

@ -254,7 +254,7 @@ void scif_sas_stp_task_request_abort_task_set_failure_handler(
fw_domain->controller,
fw_device,
pending_request,
SCI_FAILURE_IO_TERMINATED
SCI_IO_FAILURE_TERMINATED
);
}
//otherwise, the abort succeeded. Since the waiting flag is cleared,

View File

@ -87,6 +87,4 @@ SRCS += \
SRCS += opt_scsi.h opt_cam.h opt_isci.h
SRCS += device_if.h bus_if.h pci_if.h
CC = gcc
.include <bsd.kmod.mk>