lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1395815042-26917-1-git-send-email-sj38.park@gmail.com>
Date:	Wed, 26 Mar 2014 15:24:02 +0900
From:	SeongJae Park <sj38.park@...il.com>
To:	scameron@...rdog.cce.hp.com, JBottomley@...alles.com
Cc:	iss_storagedev@...com, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, SeongJae Park <sj38.park@...il.com>
Subject: [PATCH] [SCSI] hpsa: use trans_support after value assigned

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@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ