[PATCH] scsi: qla2xxx: Make qla_set_ini_mode() return void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The return value is not used by the caller and the local variable 'rc'
is not needed. So make qla_set_ini_mode() return void and remove 'rc'.
This also fixes the following coccicheck warning:

drivers/scsi/qla2xxx/qla_attr.c:1906:5-7: Unneeded variable: "rc".
Return "0" on line 2180

Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
 drivers/scsi/qla2xxx/qla_attr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 4cfebf34ad7c..ca7118982c12 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1925,9 +1925,8 @@ static char *mode_to_str[] = {
 };
 
 #define NEED_EXCH_OFFLOAD(_exchg) ((_exchg) > FW_DEF_EXCHANGES_CNT)
-static int qla_set_ini_mode(scsi_qla_host_t *vha, int op)
+static void qla_set_ini_mode(scsi_qla_host_t *vha, int op)
 {
-	int rc = 0;
 	enum {
 		NO_ACTION,
 		MODE_CHANGE_ACCEPT,
@@ -2200,8 +2199,6 @@ static int qla_set_ini_mode(scsi_qla_host_t *vha, int op)
 		    vha->ql2xexchoffld, vha->u_ql2xexchoffld);
 		break;
 	}
-
-	return rc;
 }
 
 static ssize_t
-- 
2.21.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux