From: SeongJae Park <sj38.park@gmail.com>
To: scameron@beardog.cce.hp.com, JBottomley@paralles.com
Cc: iss_storagedev@hp.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH] [SCSI] hpsa: use trans_support after value assigned
Date: Wed, 26 Mar 2014 15:24:02 +0900 [thread overview]
Message-ID: <1395815042-26917-1-git-send-email-sj38.park@gmail.com> (raw)
Because trans_support be used when check i/o accelerator mode support
before its value assigned, it caused following build warning:
drivers/scsi/hpsa.c: In function ‘hpsa_init_one’:
drivers/scsi/hpsa.c:7468:20: warning: ‘trans_support’
may be used uninitialized in this function [-Wmaybe-uninitialized]
if (trans_support & CFGTBL_Trans_io_accel1) {
^
drivers/scsi/hpsa.c:7459:6: note: ‘trans_support’ was
declared here
u32 trans_support;
^
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
---
drivers/scsi/hpsa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8cf4a0c..a4ae873 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -7455,7 +7455,7 @@ clean_up:
static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
{
- u32 trans_support;
+ u32 trans_support = readl(&(h->cfgtable->TransportSupport));
unsigned long transMethod = CFGTBL_Trans_Performant |
CFGTBL_Trans_use_short_tags;
int i;
@@ -7479,7 +7479,6 @@ static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
}
/* TODO, check that this next line h->nreply_queues is correct */
- trans_support = readl(&(h->cfgtable->TransportSupport));
if (!(trans_support & PERFORMANT_MODE))
return;
--
1.8.3.2
reply other threads:[~2014-03-26 6:21 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=1395815042-26917-1-git-send-email-sj38.park@gmail.com \
--to=sj38.park@gmail.com \
--cc=JBottomley@paralles.com \
--cc=iss_storagedev@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=scameron@beardog.cce.hp.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®