summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-06-26 15:44:52 +0200
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:17:00 -0400
commit0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a (patch)
treeef0e5781cbc2728f0c1c57bd9d8ee56d5ebee0b3 /drivers/scsi
parent6aa4c361bf8b1f08b34fb6c581db352d7f7cff46 (diff)
downloadop-kernel-dev-0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a.zip
op-kernel-dev-0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a.tar.gz
hpsa: fix non-x86 builds
commit 28e134464734 "[SCSI] hpsa: enable unit attention reporting" turns on unit attention notifications, but got the change wrong for all architectures other than x86, which now store an uninitialized value into the device register. Gcc helpfully warns about this: ../drivers/scsi/hpsa.c: In function 'hpsa_set_driver_support_bits': ../drivers/scsi/hpsa.c:6373:17: warning: 'driver_support' is used uninitialized in this function [-Wuninitialized] driver_support |= ENABLE_UNIT_ATTN; ^ This moves the #ifdef so only the prefetch-enable is conditional on x86, not also reading the initial register contents. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 28e134464734 "[SCSI] hpsa: enable unit attention reporting" Cc: stable@vger.kernel.org # v3.14+ Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 10aed7d..6b4d046 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6366,9 +6366,9 @@ static inline void hpsa_set_driver_support_bits(struct ctlr_info *h)
{
u32 driver_support;
-#ifdef CONFIG_X86
- /* Need to enable prefetch in the SCSI core for 6400 in x86 */
driver_support = readl(&(h->cfgtable->driver_support));
+ /* Need to enable prefetch in the SCSI core for 6400 in x86 */
+#ifdef CONFIG_X86
driver_support |= ENABLE_SCSI_PREFETCH;
#endif
driver_support |= ENABLE_UNIT_ATTN;
OpenPOWER on IntegriCloud