mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
26bace349e
commit
467e855a03
6 changed files with 16 additions and 17 deletions
|
@ -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,
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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__,
|
||||
|
|
Loading…
Reference in a new issue