From: James Smart <James.Smart@Emulex.Com>
To: "Smart, James" <James.Smart@Emulex.Com>
Cc: Benny Halevy <bhalevy@panasas.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] lpfc: fix compiler warning in lpfc_bus_reset_handler
Date: Wed, 20 Aug 2008 12:13:47 -0400 [thread overview]
Message-ID: <48AC42BB.70703@emulex.com> (raw)
In-Reply-To: <48AC3F44.4010005@emulex.com>
Actually, I'm about to post another set of patches, and this fix is
included. So pick it up there...
-- james s
Smart, James wrote:
> Acked-by: James Smart <james.smart@emulex.com>
>
> -- james s
>
> Benny Halevy wrote:
>> gcc 4.3.0 prints this warning:
>>
>> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bus_reset_handler’:
>> drivers/scsi/lpfc/lpfc_scsi.c:1245:\
>> warning: ‘status’ may be used uninitialized in this function
>>
>> It seems like the warning is bogus. However, this patch makes
>> sure status is always initialized before used.
>>
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>> drivers/scsi/lpfc/lpfc_scsi.c | 5 +++--
>> 1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
>> index 1bcebbd..9eda9b2 100644
>> --- a/drivers/scsi/lpfc/lpfc_scsi.c
>> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
>> @@ -1278,8 +1278,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
>> ndlp->rport->dd_data);
>> if (status != TIMEOUT_ERROR)
>> lpfc_release_scsi_buf(phba, lpfc_cmd);
>> - }
>> - if (!lpfc_cmd || status != SUCCESS) {
>> + } else
>> + status = FAILED;
>> + if (status != SUCCESS) {
>> lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
>> "0700 Bus Reset on target %d failed\n",
>> i);
>> --
>> 1.6.0
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-08-20 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-15 2:52 [PATCH 1/5] lpfc 8.2.7 : Change device reset behavior James Smart
2008-08-20 14:35 ` [PATCH] lpfc: fix compiler warning in lpfc_bus_reset_handler Benny Halevy
2008-08-20 15:59 ` James Smart
2008-08-20 16:13 ` James Smart [this message]
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=48AC42BB.70703@emulex.com \
--to=james.smart@emulex.com \
--cc=bhalevy@panasas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.