From: Dan Carpenter <dan.carpenter@oracle.com>
To: chad.dupuis@cavium.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.
Date: Thu, 2 Mar 2017 23:28:18 +0300 [thread overview]
Message-ID: <20170302202818.GA10877@mwanda> (raw)
Hello Dupuis, Chad,
The patch 61d8658b4a43: "scsi: qedf: Add QLogic FastLinQ offload FCoE
driver framework." from Feb 15, 2017, leads to the following static
checker warning:
drivers/scsi/qedf/qedf_main.c:1168 qedf_rport_event_handler()
warn: 'rval' can be either negative or positive
drivers/scsi/qedf/qedf_main.c
1005 static int qedf_offload_connection(struct qedf_ctx *qedf,
1006 struct qedf_rport *fcport)
1007 {
1008 struct qed_fcoe_params_offload conn_info;
1009 u32 port_id;
1010 u8 lport_src_id[3];
1011 int rval;
1012 uint16_t total_sqe = (fcport->sq_mem_size / sizeof(struct fcoe_wqe));
1013
1014 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_CONN, "Offloading connection "
1015 "portid=%06x.\n", fcport->rdata->ids.port_id);
1016 rval = qed_ops->acquire_conn(qedf->cdev, &fcport->handle,
1017 &fcport->fw_cid, &fcport->p_doorbell);
1018 if (rval) {
1019 QEDF_WARN(&(qedf->dbg_ctx), "Could not acquire connection "
1020 "for portid=%06x.\n", fcport->rdata->ids.port_id);
1021 rval = 1; /* For some reason qed returns 0 on failure here */
What kind of an error is 1 supposed to indicate? This needs to be
not a magic number and commented.
1022 goto out;
1023 }
1024
1025 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_CONN, "portid=%06x "
1026 "fw_cid=%08x handle=%d.\n", fcport->rdata->ids.port_id,
1027 fcport->fw_cid, fcport->handle);
1028
1029 memset(&conn_info, 0, sizeof(struct qed_fcoe_params_offload));
1030
regards,
dan carpenter
next reply other threads:[~2017-03-02 20:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 20:28 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-27 16:47 [bug report] scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework Dan Carpenter
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=20170302202818.GA10877@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chad.dupuis@cavium.com \
--cc=linux-scsi@vger.kernel.org \
/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