[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V2 18/23] hw: net: cadence_gem: Fix build errors in DB_PRINT()
From: |
Jason Wang |
Subject: |
[PULL V2 18/23] hw: net: cadence_gem: Fix build errors in DB_PRINT() |
Date: |
Tue, 3 Mar 2020 18:10:37 +0800 |
From: Bin Meng <address@hidden>
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 <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/net/cadence_gem.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index ddabdb3..6340c1e 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -987,8 +987,9 @@ static ssize_t gem_receive(NetClientState *nc, const
uint8_t *buf, size_t size)
return -1;
}
- DB_PRINT("copy %d bytes to 0x%x\n", MIN(bytes_to_copy, rxbufsize),
- rx_desc_get_buffer(s->rx_desc[q]));
+ DB_PRINT("copy %u bytes to 0x%" PRIx64 "\n",
+ MIN(bytes_to_copy, rxbufsize),
+ rx_desc_get_buffer(s, s->rx_desc[q]));
/* Copy packet data to emulated DMA buffer */
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) -
(p - tx_packet)) {
- DB_PRINT("TX descriptor @ 0x%x too large: size 0x%x space " \
- "0x%x\n", (unsigned)packet_desc_addr,
- (unsigned)tx_desc_get_length(desc),
+ DB_PRINT("TX descriptor @ 0x%" HWADDR_PRIx \
+ " too large: size 0x%x space 0x%zx\n",
+ packet_desc_addr, tx_desc_get_length(desc),
sizeof(tx_packet) - (p - tx_packet));
break;
}
--
2.5.0
- [PULL V2 21/23] net/filter.c: Add Options to insert filters anywhere in the filter list, (continued)
- [PULL V2 21/23] net/filter.c: Add Options to insert filters anywhere in the filter list, Jason Wang, 2020/03/03
- [PULL V2 06/23] dp8393x: Clear RRRA command register bit only when appropriate, Jason Wang, 2020/03/03
- [PULL V2 07/23] dp8393x: Implement packet size limit and RBAE interrupt, Jason Wang, 2020/03/03
- [PULL V2 15/23] e1000e: Avoid hw_error if legacy mode used, Jason Wang, 2020/03/03
- [PULL V2 20/23] tests/test-replication.c: Add test for for secondary node continuing replication, Jason Wang, 2020/03/03
- [PULL V2 19/23] block/replication.c: Ignore requests after failover, Jason Wang, 2020/03/03
- [PULL V2 22/23] colo: Update Documentation for continuous replication, Jason Wang, 2020/03/03
- [PULL V2 23/23] l2tpv3: fix RFC number typo in qemu-options.hx, Jason Wang, 2020/03/03
- [PULL V2 08/23] dp8393x: Don't clobber packet checksum, Jason Wang, 2020/03/03
- [PULL V2 09/23] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Jason Wang, 2020/03/03
- [PULL V2 18/23] hw: net: cadence_gem: Fix build errors in DB_PRINT(),
Jason Wang <=
- Re: [PULL V2 00/23] Net patches, Peter Maydell, 2020/03/03