diff options
author | Bartosz Barcinski <Bartosz.Barcinski@intel.com> | 2011-04-12 17:28:41 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 04:00:37 -0700 |
commit | 467e855a0331f619f41fbf7391bc29ec0ca923a0 (patch) | |
tree | b41ed653dcb0b6a0f6c9ab1ee2cc5bfb129eda8c /drivers/scsi/isci | |
parent | 26bace349ecd08b1d744f7067d24fd1bedb91020 (diff) | |
download | blackbird-op-linux-467e855a0331f619f41fbf7391bc29ec0ca923a0.tar.gz blackbird-op-linux-467e855a0331f619f41fbf7391bc29ec0ca923a0.zip |
isci: sparse warnings cleanup
Clean warnings and errors reported by sparse tool.
request.c:430:50: warning: mixing different enum types
remote_device.c:534:39: warning: symbol 'flags' shadows an earlier one
task.c:495:44: warning: mixing different enum types
scic_sds_controller.c:2155:24: warning: mixing different enum types
scic_sds_controller.c:2272:36: warning: mixing different enum types
scic_sds_controller.c:2911:38: warning: incorrect type in initializer (different address spaces)
scic_sds_controller.c:2913:25: warning: incorrect type in argument 2 (different address spaces)
scic_sds_request.c:875:34: warning: cast removes address space of expression
scic_sds_request.c:876:123: warning: incorrect type in argument 2 (different address spaces)
scic_sds_port.c:585:51: warning: incorrect type in assignment (different address spaces)
scic_sds_port.c:712:9: warning: incorrect type in argument 2 (different address spaces)
scic_sds_port.c:1770:25: warning: incorrect type in argument 2 (different address spaces)
Signed-off-by: Bartosz Barcinski <Bartosz.Barcinski@intel.com>
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
[fixed up some false positives and misconversions]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r-- | drivers/scsi/isci/core/scic_controller.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 8 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_port.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_request.c | 11 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/task.c | 4 |
6 files changed, 16 insertions, 17 deletions
diff --git a/drivers/scsi/isci/core/scic_controller.h b/drivers/scsi/isci/core/scic_controller.h index 23a2c785fecd..23c7b5c004f4 100644 --- a/drivers/scsi/isci/core/scic_controller.h +++ b/drivers/scsi/isci/core/scic_controller.h @@ -98,7 +98,7 @@ enum sci_status scic_controller_stop( enum sci_status scic_controller_reset( struct scic_sds_controller *controller); -enum sci_io_status scic_controller_start_io( +enum sci_status scic_controller_start_io( struct scic_sds_controller *controller, struct scic_sds_remote_device *remote_device, struct scic_sds_request *io_request, diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index 78b2e6f76d1a..8194618b76c6 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c @@ -1967,10 +1967,10 @@ enum sci_status scic_controller_reset( * requirement for the user to call scic_stp_io_set_ncq_tag() prior to invoking * the scic_controller_start_io() method. scic_controller_allocate_tag() for * more information on allocating a tag. Indicate if the controller - * successfully started the IO request. SCI_IO_SUCCESS if the IO request was + * successfully started the IO request. SCI_SUCCESS if the IO request was * successfully started. Determine the failure situations and return values. */ -enum sci_io_status scic_controller_start_io( +enum sci_status scic_controller_start_io( struct scic_sds_controller *scic, struct scic_sds_remote_device *rdev, struct scic_sds_request *req, @@ -2723,8 +2723,8 @@ enum sci_status scic_controller_initialize( * logical ports */ for (index = 0; index < max_supported_ports; index++) { - struct scu_port_task_scheduler_group_registers *ptsg = - &scic->scu_registers->peg0.ptsg; + struct scu_port_task_scheduler_group_registers __iomem + *ptsg = &scic->scu_registers->peg0.ptsg; writel(index, &ptsg->protocol_engine[index]); } diff --git a/drivers/scsi/isci/core/scic_sds_port.h b/drivers/scsi/isci/core/scic_sds_port.h index a17c64a7cbf2..c7741e81336e 100644 --- a/drivers/scsi/isci/core/scic_sds_port.h +++ b/drivers/scsi/isci/core/scic_sds_port.h @@ -250,7 +250,7 @@ struct scic_sds_port { * task scheduler group PE configuration registers. * It is used to assign PEs to a port. */ - u32 *port_pe_configuration_register; + u32 __iomem *port_pe_configuration_register; /** * This field is the VIIT register space for ths port object. diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c index 191b5d0f1a53..64aa9c60836f 100644 --- a/drivers/scsi/isci/core/scic_sds_request.c +++ b/drivers/scsi/isci/core/scic_sds_request.c @@ -850,19 +850,20 @@ void *scic_io_request_get_response_iu_address( u32 scic_io_request_get_number_of_bytes_transferred( struct scic_sds_request *scic_sds_request) { + struct scic_sds_controller *scic = scic_sds_request->owning_controller; u32 ret_val = 0; - if (readl(&scic_sds_request->owning_controller->smu_registers->address_modifier) == 0) { + if (readl(&scic->smu_registers->address_modifier) == 0) { + void __iomem *scu_reg_base = scic->scu_registers; /* * get the bytes of data from the Address == BAR1 + 20002Ch + (256*TCi) where * BAR1 is the scu_registers * 0x20002C = 0x200000 + 0x2c * = start of task context SRAM + offset of (type.ssp.data_offset) * TCi is the io_tag of struct scic_sds_request */ - ret_val = readl((u8 *)scic_sds_request->owning_controller->scu_registers + - (SCU_TASK_CONTEXT_SRAM + SCI_FIELD_OFFSET(struct scu_task_context, type.ssp.data_offset)) + - ((sizeof(struct scu_task_context)) * scic_sds_io_tag_get_index(scic_sds_request->io_tag)) - ); + ret_val = readl(scu_reg_base + + (SCU_TASK_CONTEXT_SRAM + offsetof(struct scu_task_context, type.ssp.data_offset)) + + ((sizeof(struct scu_task_context)) * scic_sds_io_tag_get_index(scic_sds_request->io_tag))); } return ret_val; diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index ab638ec5881c..320850cf46f2 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c @@ -513,15 +513,13 @@ bool isci_device_is_reset_pending( __func__, isci_device, isci_request); if (isci_request->ttype == io_task) { - - unsigned long flags; struct sas_task *task = isci_request_access_task( isci_request); - spin_lock_irqsave(&task->task_state_lock, flags); + spin_lock(&task->task_state_lock); if (task->task_state_flags & SAS_TASK_NEED_DEV_RESET) reset_is_pending = true; - spin_unlock_irqrestore(&task->task_state_lock, flags); + spin_unlock(&task->task_state_lock); } } diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index aa6b43067e25..b88101e195d1 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c @@ -429,7 +429,7 @@ int isci_task_execute_tmf( unsigned long timeout_ms) { DECLARE_COMPLETION_ONSTACK(completion); - enum sci_status status = SCI_FAILURE; + enum sci_task_status status = SCI_TASK_FAILURE; struct scic_sds_remote_device *sci_device; struct isci_remote_device *isci_device = tmf->device; struct isci_request *request; @@ -488,7 +488,7 @@ int isci_task_execute_tmf( SCI_CONTROLLER_INVALID_IO_TAG ); - if (status != SCI_SUCCESS) { + if (status != SCI_TASK_SUCCESS) { dev_warn(&isci_host->pdev->dev, "%s: start_io failed - status = 0x%x, request = %p\n", __func__, |