hw: net: cadence_gem: Fix build errors in DB_PRINT()
When CADENCE_GEM_ERR_DEBUG is turned on, there are several compilation errors in DB_PRINT(). Fix them. While we are here, update to use appropriate modifiers in the same DB_PRINT() call. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
2683a927ff
commit
dda8f1854b
|
@ -987,8 +987,9 @@ static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB_PRINT("copy %d bytes to 0x%x\n", MIN(bytes_to_copy, rxbufsize),
|
DB_PRINT("copy %u bytes to 0x%" PRIx64 "\n",
|
||||||
rx_desc_get_buffer(s->rx_desc[q]));
|
MIN(bytes_to_copy, rxbufsize),
|
||||||
|
rx_desc_get_buffer(s, s->rx_desc[q]));
|
||||||
|
|
||||||
/* Copy packet data to emulated DMA buffer */
|
/* Copy packet data to emulated DMA buffer */
|
||||||
address_space_write(&s->dma_as, rx_desc_get_buffer(s, s->rx_desc[q]) +
|
address_space_write(&s->dma_as, rx_desc_get_buffer(s, s->rx_desc[q]) +
|
||||||
|
@ -1159,9 +1160,9 @@ static void gem_transmit(CadenceGEMState *s)
|
||||||
|
|
||||||
if (tx_desc_get_length(desc) > sizeof(tx_packet) -
|
if (tx_desc_get_length(desc) > sizeof(tx_packet) -
|
||||||
(p - tx_packet)) {
|
(p - tx_packet)) {
|
||||||
DB_PRINT("TX descriptor @ 0x%x too large: size 0x%x space " \
|
DB_PRINT("TX descriptor @ 0x%" HWADDR_PRIx \
|
||||||
"0x%x\n", (unsigned)packet_desc_addr,
|
" too large: size 0x%x space 0x%zx\n",
|
||||||
(unsigned)tx_desc_get_length(desc),
|
packet_desc_addr, tx_desc_get_length(desc),
|
||||||
sizeof(tx_packet) - (p - tx_packet));
|
sizeof(tx_packet) - (p - tx_packet));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue