Re: [PATCH v4 1/3] net/xen-netfront: Correct printf format in xennet_get_responses

2015-06-21 Thread David Miller
From: Julien Grall 
Date: Tue, 16 Jun 2015 20:10:46 +0100

> rx->status is an int16_t, print it using %d rather than %u in order to
> have a meaningful value when the field is negative.
> 
> Also use %u rather than %x for rx->offset.
> 
> Signed-off-by: Julien Grall 
> Reviewed-by: David Vrabel 

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in


[PATCH v4 1/3] net/xen-netfront: Correct printf format in xennet_get_responses

2015-06-16 Thread Julien Grall
rx->status is an int16_t, print it using %d rather than %u in order to
have a meaningful value when the field is negative.

Also use %u rather than %x for rx->offset.

Signed-off-by: Julien Grall 
Reviewed-by: David Vrabel 
Cc: Konrad Rzeszutek Wilk 
Cc: Boris Ostrovsky 
Cc: netdev@vger.kernel.org

---
Changes in v4:
- Use %u for the rx->offset because offset is unsigned

Changes in v3:
- Use %d for the rx->offset too.

Changes in v2:
- Add David's Reviewed-by
---
 drivers/net/xen-netfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index e031c94..281720f 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -733,7 +733,7 @@ static int xennet_get_responses(struct netfront_queue 
*queue,
if (unlikely(rx->status < 0 ||
 rx->offset + rx->status > PAGE_SIZE)) {
if (net_ratelimit())
-   dev_warn(dev, "rx->offset: %x, size: %u\n",
+   dev_warn(dev, "rx->offset: %u, size: %d\n",
 rx->offset, rx->status);
xennet_move_rx_slot(queue, skb, ref);
err = -EINVAL;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html