From: zwu.kernel@gmail.com
To: linux-scsi@vger.kernel.org
Cc: jbottomley@parallels.com, linux-kernel@vger.kernel.org,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: [PATCH] scsi: fix the build warning
Date: Thu, 22 Aug 2013 08:44:22 +0800 [thread overview]
Message-ID: <1377132262-15744-1-git-send-email-zwu.kernel@gmail.com> (raw)
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Initialize csum variable to fix the build warning.
drivers/scsi/scsi_debug.c: In function ‘dif_verify’:
drivers/scsi/scsi_debug.c:1755:3: warning: ‘csum’ may be used uninitialized in this function [-Wmaybe-uninitialized]
LD drivers/built-in.o
CHK include/generated/uapi/linux/version.h
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `relocs'.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
drivers/scsi/scsi_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index cb4fefa..50d70c3 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -1733,7 +1733,7 @@ static int do_device_access(struct scsi_cmnd *scmd,
static u16 dif_compute_csum(const void *buf, int len)
{
- u16 csum;
+ u16 csum = -1;
switch (scsi_debug_guard) {
case 1:
--
1.7.11.7
next reply other threads:[~2013-08-22 0:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 0:44 zwu.kernel [this message]
2013-08-22 1:02 ` [PATCH] scsi: fix the build warning Joe Perches
2013-08-22 1:05 ` Zhi Yong Wu
2013-08-22 1:17 ` Joe Perches
2013-08-22 1:25 ` Martin K. Petersen
2013-08-22 1:55 ` Joe Perches
2013-08-22 1:59 ` Zhi Yong Wu
2013-08-22 2:25 ` Joe Perches
2013-08-22 12:42 ` Akinobu Mita
2013-08-22 14:27 ` James Bottomley
2013-08-22 14:49 ` Akinobu Mita
2013-09-20 9:53 ` Paul Bolle
2013-09-20 14:32 ` Akinobu Mita
2013-09-20 16:14 ` Paul Bolle
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=1377132262-15744-1-git-send-email-zwu.kernel@gmail.com \
--to=zwu.kernel@gmail.com \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=wuzhy@linux.vnet.ibm.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