scsi: aacraid: avoid open-coded upper_32_bits

Shifting a dma_addr_t right by 32 bits causes a compile-time warning
when that type is only 32 bit wide:

drivers/scsi/aacraid/src.c: In function 'aac_src_start_adapter':
drivers/scsi/aacraid/src.c:414:29: error: right shift count >= width of type [-Werror=shift-count-overflow]

This changes the driver to use the predefined macros consistently,
including one correct but open-coded upper_32_bits() instance.

Fixes: d1ef4da848 ("scsi: aacraid: added support for init_struct_8")
Fixes: 423400e64d ("scsi: aacraid: Include HBA direct interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Arnd Bergmann 2017-02-07 13:59:30 +01:00 committed by Martin K. Petersen
parent 7629146977
commit 80a94bb357
1 changed files with 3 additions and 3 deletions

View File

@ -410,8 +410,8 @@ static void aac_src_start_adapter(struct aac_dev *dev)
if (dev->comm_interface == AAC_COMM_MESSAGE_TYPE3) { if (dev->comm_interface == AAC_COMM_MESSAGE_TYPE3) {
init->r8.host_elapsed_seconds = cpu_to_le32(get_seconds()); init->r8.host_elapsed_seconds = cpu_to_le32(get_seconds());
src_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, src_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS,
(u32)(ulong)dev->init_pa, lower_32_bits(dev->init_pa),
(u32)((ulong)dev->init_pa>>32), upper_32_bits(dev->init_pa),
sizeof(struct _r8) + sizeof(struct _r8) +
(AAC_MAX_HRRQ - 1) * sizeof(struct _rrq), (AAC_MAX_HRRQ - 1) * sizeof(struct _rrq),
0, 0, 0, NULL, NULL, NULL, NULL, NULL); 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
@ -563,7 +563,7 @@ static int aac_src_deliver_message(struct fib *fib)
fib->hw_fib_va->header.SenderFibAddress = fib->hw_fib_va->header.SenderFibAddress =
cpu_to_le32((u32)address); cpu_to_le32((u32)address);
fib->hw_fib_va->header.u.TimeStamp = 0; fib->hw_fib_va->header.u.TimeStamp = 0;
WARN_ON(((u32)(((address) >> 16) >> 16)) != 0L); WARN_ON(upper_32_bits(address) != 0L);
} else { } else {
/* Calculate the amount to the fibsize bits */ /* Calculate the amount to the fibsize bits */
fibsize = (sizeof(struct aac_fib_xporthdr) + fibsize = (sizeof(struct aac_fib_xporthdr) +