aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2015-06-01 06:30:04 -0400
committerDavid S. Miller <davem@davemloft.net>2015-06-01 15:03:04 -0400
commitdc5e7a811d3e57f2b10a4c4c90b175ce498a097d (patch)
treea64cd5e0f6d2d5db7fc3c51239d497cc4d0e02eb
parent24595346d79b6bd98a77d24c493e8490639788fc (diff)
xen: netback: fix printf format string warning
drivers/net/xen-netback/netback.c: In function ‘xenvif_tx_build_gops’: drivers/net/xen-netback/netback.c:1253:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=] (txreq.offset&~PAGE_MASK) + txreq.size); ^ PAGE_MASK's type can vary by arch, so a cast is needed. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> ---- v2: Cast to unsigned long, since PAGE_MASK can vary by arch. Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/xen-netback/netback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 4de46aa61d95..0d2594395ffb 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1250,7 +1250,7 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
1250 netdev_err(queue->vif->dev, 1250 netdev_err(queue->vif->dev,
1251 "txreq.offset: %x, size: %u, end: %lu\n", 1251 "txreq.offset: %x, size: %u, end: %lu\n",
1252 txreq.offset, txreq.size, 1252 txreq.offset, txreq.size,
1253 (txreq.offset&~PAGE_MASK) + txreq.size); 1253 (unsigned long)(txreq.offset&~PAGE_MASK) + txreq.size);
1254 xenvif_fatal_tx_err(queue->vif); 1254 xenvif_fatal_tx_err(queue->vif);
1255 break; 1255 break;
1256 } 1256 }