mirror of https://gitee.com/openkylin/linux.git
scsi: pmcraid: remove redundant initializations of pointer 'ioadl'
There are several occurrances where pointer ioadl is initialized with a value that is never read and where it is re-assigned a new value later on, hence the initialization is redundant and can be removed. Cleans up clang warnings: drivers/scsi/pmcraid.c:1028:29: warning: Value stored to 'ioadl' during its initialization is never read drivers/scsi/pmcraid.c:3178:29: warning: Value stored to 'ioadl' during its initialization is never read drivers/scsi/pmcraid.c:5495:29: warning: Value stored to 'ioadl' during its initialization is never read drivers/scsi/pmcraid.c:5668:29: warning: Value stored to 'ioadl' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
2976fbb6a7
commit
b22ee87d84
|
@ -1025,7 +1025,7 @@ static void pmcraid_get_fwversion_done(struct pmcraid_cmd *cmd)
|
|||
static void pmcraid_get_fwversion(struct pmcraid_cmd *cmd)
|
||||
{
|
||||
struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb;
|
||||
struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl;
|
||||
struct pmcraid_ioadl_desc *ioadl;
|
||||
struct pmcraid_instance *pinstance = cmd->drv_inst;
|
||||
u16 data_size = sizeof(struct pmcraid_inquiry_data);
|
||||
|
||||
|
@ -3175,7 +3175,7 @@ static int pmcraid_build_ioadl(
|
|||
|
||||
struct scsi_cmnd *scsi_cmd = cmd->scsi_cmd;
|
||||
struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb);
|
||||
struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl;
|
||||
struct pmcraid_ioadl_desc *ioadl;
|
||||
|
||||
u32 length = scsi_bufflen(scsi_cmd);
|
||||
|
||||
|
@ -5492,7 +5492,7 @@ static void pmcraid_set_timestamp(struct pmcraid_cmd *cmd)
|
|||
struct pmcraid_instance *pinstance = cmd->drv_inst;
|
||||
struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb;
|
||||
__be32 time_stamp_len = cpu_to_be32(PMCRAID_TIMESTAMP_LEN);
|
||||
struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl;
|
||||
struct pmcraid_ioadl_desc *ioadl;
|
||||
u64 timestamp;
|
||||
|
||||
timestamp = ktime_get_real_seconds() * 1000;
|
||||
|
@ -5665,7 +5665,7 @@ static void pmcraid_init_res_table(struct pmcraid_cmd *cmd)
|
|||
static void pmcraid_querycfg(struct pmcraid_cmd *cmd)
|
||||
{
|
||||
struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb;
|
||||
struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl;
|
||||
struct pmcraid_ioadl_desc *ioadl;
|
||||
struct pmcraid_instance *pinstance = cmd->drv_inst;
|
||||
__be32 cfg_table_size = cpu_to_be32(sizeof(struct pmcraid_config_table));
|
||||
|
||||
|
|
Loading…
Reference in New Issue