summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-10-18 09:03:33 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-06 21:31:28 -0500
commit6f6eb3ccc6ff46137b1d2951ef3a0a163a0aa601 (patch)
tree5022a3b6bd0bfb0a3b0fe4ddefe11d4d136fb9fc
parentb03f3c3e527a7da50f12ddb2021cb28ed99e46f7 (diff)
scsi: ips: use lower_32_bits and upper_32_bits instead of reinventing them
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>
-rw-r--r--drivers/scsi/ips.c6
-rw-r--r--drivers/scsi/ips.h3
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index ee8a1ecd58fd..679321e96a86 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -1801,13 +1801,13 @@ ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr,
1801 } 1801 }
1802 if (IPS_USE_ENH_SGLIST(ha)) { 1802 if (IPS_USE_ENH_SGLIST(ha)) {
1803 scb->sg_list.enh_list[indx].address_lo = 1803 scb->sg_list.enh_list[indx].address_lo =
1804 cpu_to_le32(pci_dma_lo32(busaddr)); 1804 cpu_to_le32(lower_32_bits(busaddr));
1805 scb->sg_list.enh_list[indx].address_hi = 1805 scb->sg_list.enh_list[indx].address_hi =
1806 cpu_to_le32(pci_dma_hi32(busaddr)); 1806 cpu_to_le32(upper_32_bits(busaddr));
1807 scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len); 1807 scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len);
1808 } else { 1808 } else {
1809 scb->sg_list.std_list[indx].address = 1809 scb->sg_list.std_list[indx].address =
1810 cpu_to_le32(pci_dma_lo32(busaddr)); 1810 cpu_to_le32(lower_32_bits(busaddr));
1811 scb->sg_list.std_list[indx].length = cpu_to_le32(e_len); 1811 scb->sg_list.std_list[indx].length = cpu_to_le32(e_len);
1812 } 1812 }
1813 1813
diff --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
index db546171e97f..42c180e3938b 100644
--- a/drivers/scsi/ips.h
+++ b/drivers/scsi/ips.h
@@ -96,9 +96,6 @@
96 #define __iomem 96 #define __iomem
97 #endif 97 #endif
98 98
99 #define pci_dma_hi32(a) ((a >> 16) >> 16)
100 #define pci_dma_lo32(a) (a & 0xffffffff)
101
102 #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G) 99 #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
103 #define IPS_ENABLE_DMA64 (1) 100 #define IPS_ENABLE_DMA64 (1)
104 #else 101 #else