mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 21:48:35 +01:00
Generic: Type fixes for byte swapping
Cast further pointer arguments for B_HOST_TO_LENDIAN_INT32 to uint32. Resolves warnings treated as errors for Big Endian targets. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38127 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef855c9edb
commit
994f861dfc
@ -249,7 +249,7 @@ ata_adapter_prepare_dma(ata_adapter_channel_info *channel,
|
||||
writeToDevice ? "write" : "read", sgListCount);
|
||||
|
||||
for (i = sgListCount - 1, prd = channel->prdt; i >= 0; --i, ++prd, ++sgList) {
|
||||
prd->address = B_HOST_TO_LENDIAN_INT32(pci->ram_address(device,
|
||||
prd->address = B_HOST_TO_LENDIAN_INT32((uint32)pci->ram_address(device,
|
||||
(void*)(addr_t)sgList->address));
|
||||
// 0 means 64K - this is done automatically be discarding upper 16 bits
|
||||
prd->count = B_HOST_TO_LENDIAN_INT16((uint16)sgList->size);
|
||||
@ -262,7 +262,8 @@ ata_adapter_prepare_dma(ata_adapter_channel_info *channel,
|
||||
|
||||
pci->write_io_32(device, channel->bus_master_base + ATA_BM_PRDT_ADDRESS,
|
||||
(pci->read_io_32(device, channel->bus_master_base + ATA_BM_PRDT_ADDRESS) & 3)
|
||||
| (B_HOST_TO_LENDIAN_INT32(pci->ram_address(device, (void *)channel->prdt_phys)) & ~3));
|
||||
| (B_HOST_TO_LENDIAN_INT32((uint32)pci->ram_address(device,
|
||||
(void *)channel->prdt_phys)) & ~3));
|
||||
|
||||
// reset interrupt and error signal
|
||||
status = pci->read_io_8(device, channel->bus_master_base
|
||||
|
Loading…
x
Reference in New Issue
Block a user