hpsa: fix non-x86 builds
authorArnd Bergmann <arnd@arndb.de>
Thu, 26 Jun 2014 13:44:52 +0000 (15:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:34:16 +0000 (16:34 -0700)
commit1b313b33fa279914ba462a45f80858ed8095f8f3
tree999a18151e34f3c199dd11dd40327090a2f3a6b7
parentc2c5bc2de2a6da85e3a1cacd81bbe15c4322afa4
hpsa: fix non-x86 builds

commit 0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a upstream.

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"
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/hpsa.c