Message ID | 20200911091021.2937708-1-yanaijie@huawei.com |
---|---|
State | New |
Headers | show |
Series | scsi: qla2xxx: remove unneeded variable 'rval' | expand |
Jason, > This addresses the following coccinelle warning: > > drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval". > Return "QLA_SUCCESS" on line 7115 Applied to 5.10/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering
On Fri, 11 Sep 2020 17:10:21 +0800, Jason Yan wrote: > This addresses the following coccinelle warning: > > drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval". > Return "QLA_SUCCESS" on line 7115 Applied to 5.10/scsi-queue, thanks! [1/1] scsi: qla2xxx: Remove unneeded variable 'rval' https://git.kernel.org/mkp/scsi/c/34eb5ccf35da -- Martin K. Petersen Oracle Linux Engineering
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0bd04a62af83..df56ac8c3f00 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -7109,10 +7109,9 @@ qla24xx_reset_adapter(scsi_qla_host_t *vha) unsigned long flags = 0; struct qla_hw_data *ha = vha->hw; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; - int rval = QLA_SUCCESS; if (IS_P3P_TYPE(ha)) - return rval; + return QLA_SUCCESS; vha->flags.online = 0; ha->isp_ops->disable_intrs(ha); @@ -7127,7 +7126,7 @@ qla24xx_reset_adapter(scsi_qla_host_t *vha) if (IS_NOPOLLING_TYPE(ha)) ha->isp_ops->enable_intrs(ha); - return rval; + return QLA_SUCCESS; } /* On sparc systems, obtain port and node WWN from firmware
This addresses the following coccinelle warning: drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval". Return "QLA_SUCCESS" on line 7115 Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> --- drivers/scsi/qla2xxx/qla_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)