• Arnd Bergmann's avatar
    hpsa: fix non-x86 builds · 0b9e7b74
    Arnd Bergmann authored
    commit 28e13446 "[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: default avatarArnd Bergmann <arnd@arndb.de>
    Fixes: 28e13446 "[SCSI] hpsa: enable unit attention reporting"
    Cc: stable@vger.kernel.org # v3.14+
    Acked-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    0b9e7b74
hpsa.c 221 KB