scsi: ips: use lower_32_bits and upper_32_bits instead of reinventing them
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Oct 2018 13:03:33 +0000 (15:03 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Nov 2018 02:31:28 +0000 (21:31 -0500)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ips.c
drivers/scsi/ips.h

index ee8a1ecd58fd85f7544a450191031e8eec387d09..679321e96a868d643cc7b0682b78dffc198d2d25 100644 (file)
@@ -1801,13 +1801,13 @@ ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr,
        }
        if (IPS_USE_ENH_SGLIST(ha)) {
                scb->sg_list.enh_list[indx].address_lo =
-                   cpu_to_le32(pci_dma_lo32(busaddr));
+                   cpu_to_le32(lower_32_bits(busaddr));
                scb->sg_list.enh_list[indx].address_hi =
-                   cpu_to_le32(pci_dma_hi32(busaddr));
+                   cpu_to_le32(upper_32_bits(busaddr));
                scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len);
        } else {
                scb->sg_list.std_list[indx].address =
-                   cpu_to_le32(pci_dma_lo32(busaddr));
+                   cpu_to_le32(lower_32_bits(busaddr));
                scb->sg_list.std_list[indx].length = cpu_to_le32(e_len);
        }
 
index db546171e97fbdfc37f65d9f530a51ca0b18dab6..42c180e3938bec3036a22ad55be55a06e44b59ec 100644 (file)
@@ -96,9 +96,6 @@
       #define __iomem
    #endif
 
-   #define pci_dma_hi32(a)         ((a >> 16) >> 16)
-   #define pci_dma_lo32(a)         (a & 0xffffffff)
-
    #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
       #define IPS_ENABLE_DMA64        (1)
    #else