Skip to contentSkip to conversation

Remove compilation warning

PATCH In review pedro 2 participants 3 messages Feb 25, 2015

Subsystems (2)
lore
Share & tools
lore

pedro

author
#0 lore raw

PATCH 1/1 Remove compilation warning

offset and size are of type uint16_t so the %lu gives a warning A %u specifier, the same used in size makes gcc happy

---
 drivers/net/xen-netback/netback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index f7a31d2..3888a2b 100644
@@ -1248,7 +1248,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
 		/* No crossing a page as the payload mustn't fragment. */
 		if (unlikely((txreq.offset + txreq.size) > PAGE_SIZE)) {
 			netdev_err(queue->vif->dev,
-				   "txreq.offset: %x, size: %u, end: %lu\n",
+				   "txreq.offset: %x, size: %u, end: %u\n",
 				   txreq.offset, txreq.size,
 				   (txreq.offset&~PAGE_MASK) + txreq.size);
 			xenvif_fatal_tx_err(queue->vif);
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · pedro

offset and size are of type uint16_t so the %lu gives a warning A %u specifier, the same used in size makes gcc happy

Thanks for the patch.

One question though. Is "pedro" your real full name? Per SubmittingPatches, you need to use your real name in SoB.

Wei.