Skip to content

Commit 6f6eb3c

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
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>
1 parent b03f3c3 commit 6f6eb3c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

drivers/scsi/ips.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,13 +1801,13 @@ ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr,
18011801
}
18021802
if (IPS_USE_ENH_SGLIST(ha)) {
18031803
scb->sg_list.enh_list[indx].address_lo =
1804-
cpu_to_le32(pci_dma_lo32(busaddr));
1804+
cpu_to_le32(lower_32_bits(busaddr));
18051805
scb->sg_list.enh_list[indx].address_hi =
1806-
cpu_to_le32(pci_dma_hi32(busaddr));
1806+
cpu_to_le32(upper_32_bits(busaddr));
18071807
scb->sg_list.enh_list[indx].length = cpu_to_le32(e_len);
18081808
} else {
18091809
scb->sg_list.std_list[indx].address =
1810-
cpu_to_le32(pci_dma_lo32(busaddr));
1810+
cpu_to_le32(lower_32_bits(busaddr));
18111811
scb->sg_list.std_list[indx].length = cpu_to_le32(e_len);
18121812
}
18131813

drivers/scsi/ips.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@
9696
#define __iomem
9797
#endif
9898

99-
#define pci_dma_hi32(a) ((a >> 16) >> 16)
100-
#define pci_dma_lo32(a) (a & 0xffffffff)
101-
10299
#if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G)
103100
#define IPS_ENABLE_DMA64 (1)
104101
#else

0 commit comments

Comments
 (0)