qla2xxx: Make qla_set_ini_mode() return void

The return value is not used by the caller and the local variable 'rc' is
not needed. 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

Link: https://lore.kernel.org/r/20200429140952.8240-1-yanaijie@huawei.com
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 1b007f96f9e063f9f0b93597a4089114a89c1854 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-05-23 22:03:28 +00:00
parent a0c11c0790
commit 630c4f49d0

View File

@@ -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