From: Nilesh Javali <nilesh.javali@qlogic.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Dept-Eng QLogic Storage Upstream
<QLogic-Storage-Upstream@qlogic.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch] bnx2i: silence uninitialized variable warnings
Date: Mon, 18 Apr 2016 05:17:39 +0000 [thread overview]
Message-ID: <D33A6B7E.204D4%nilesh.javali@qlogic.com> (raw)
In-Reply-To: <20160414094006.GB16891@mwanda>
On 14/04/16 3:10 PM, "Dan Carpenter" <dan.carpenter@oracle.com> wrote:
>Presumably it isn't possible to have empty lists here, but my static
>checker doesn't know that and complains that "ep" can be used
>uninitialized.
>
>Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
>diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>index 7289437..133901f 100644
>--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>@@ -675,7 +675,7 @@ bnx2i_find_ep_in_ofld_list(struct bnx2i_hba *hba, u32
>iscsi_cid)
> {
> struct list_head *list;
> struct list_head *tmp;
>- struct bnx2i_endpoint *ep;
>+ struct bnx2i_endpoint *ep = NULL;
>
> read_lock_bh(&hba->ep_rdwr_lock);
> list_for_each_safe(list, tmp, &hba->ep_ofld_list) {
>@@ -703,7 +703,7 @@ bnx2i_find_ep_in_destroy_list(struct bnx2i_hba *hba,
>u32 iscsi_cid)
> {
> struct list_head *list;
> struct list_head *tmp;
>- struct bnx2i_endpoint *ep;
>+ struct bnx2i_endpoint *ep = NULL;
>
> read_lock_bh(&hba->ep_rdwr_lock);
> list_for_each_safe(list, tmp, &hba->ep_destroy_list) {
Acked-by: Nilesh Javali <nilesh.javali@qlogic.com>
next prev parent reply other threads:[~2016-04-18 5:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 9:40 [patch] bnx2i: silence uninitialized variable warnings Dan Carpenter
2016-04-18 5:17 ` Nilesh Javali [this message]
2016-04-26 2:03 ` Martin K. Petersen
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=D33A6B7E.204D4%nilesh.javali@qlogic.com \
--to=nilesh.javali@qlogic.com \
--cc=QLogic-Storage-Upstream@qlogic.com \
--cc=dan.carpenter@oracle.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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;
as well as URLs for NNTP newsgroup(s).