From: Yang Li <yang.lee@linux.alibaba.com>
To: Johannes.Thumshirn@wdc.com
Cc: njavali@marvell.com, mrangankar@marvell.com,
GR-QLogic-Storage-Upstream@marvell.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH] scsi: qla4xxx: turn qla4xxx_copy_from_fwddb_param() into void
Date: Sun, 7 Feb 2021 14:58:38 +0800 [thread overview]
Message-ID: <1612681118-59482-1-git-send-email-yang.lee@linux.alibaba.com> (raw)
This function always return '0' and no callers use the return value.
So make it a void function.
This eliminates the following coccicheck warning:
./drivers/scsi/qla4xxx/ql4_os.c:3642:5-7: Unneeded variable: "rc".
Return "0" on line 3741
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/scsi/qla4xxx/ql4_os.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index a4b014e..18dcb68 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3634,12 +3634,11 @@ static int qla4xxx_copy_from_fwddb_param(struct iscsi_bus_flash_session *sess,
return rc;
}
-static int qla4xxx_copy_to_fwddb_param(struct iscsi_bus_flash_session *sess,
+static void qla4xxx_copy_to_fwddb_param(struct iscsi_bus_flash_session *sess,
struct iscsi_bus_flash_conn *conn,
struct dev_db_entry *fw_ddb_entry)
{
uint16_t options;
- int rc = 0;
options = le16_to_cpu(fw_ddb_entry->options);
SET_BITVAL(conn->is_fw_assigned_ipv6, options, BIT_11);
@@ -3738,7 +3737,7 @@ static int qla4xxx_copy_to_fwddb_param(struct iscsi_bus_flash_session *sess,
COPY_ISID(fw_ddb_entry->isid, sess->isid);
- return rc;
+ return;
}
static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn,
--
1.8.3.1
reply other threads:[~2021-02-07 7:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1612681118-59482-1-git-send-email-yang.lee@linux.alibaba.com \
--to=yang.lee@linux.alibaba.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=Johannes.Thumshirn@wdc.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mrangankar@marvell.com \
--cc=njavali@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®