Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166332

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

From Julien Grall <julien.grall@citrix.com>
Newsgroups linux.kernel
Subject [PATCH v4 1/3] net/xen-netfront: Correct printf format in xennet_get_responses
Date 2015-06-16 21:20 +0200
Message-ID <pC4yT-3dz-35@gated-at.bofh.it> (permalink)
References <pC4yS-3dz-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <julien.grall@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] net/xen: Clean up Julien Grall <julien.grall@citrix.com> - 2015-06-16 21:20 +0200
  [PATCH v4 2/3] net/xen-netback: Remove unused code in xenvif_rx_action Julien Grall <julien.grall@citrix.com> - 2015-06-16 21:20 +0200
    Re: [PATCH v4 2/3] net/xen-netback: Remove unused code in  xenvif_rx_action David Miller <davem@davemloft.net> - 2015-06-21 18:40 +0200
  [PATCH v4 1/3] net/xen-netfront: Correct printf format in xennet_get_responses Julien Grall <julien.grall@citrix.com> - 2015-06-16 21:20 +0200
    Re: [PATCH v4 1/3] net/xen-netfront: Correct printf format in  xennet_get_responses David Miller <davem@davemloft.net> - 2015-06-21 18:40 +0200
  [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with 0x in the printf format Julien Grall <julien.grall@citrix.com> - 2015-06-16 21:20 +0200
    Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with  0x in the printf format Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-06-16 22:10 +0200
      Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with  0x in the printf format Joe Perches <joe@perches.com> - 2015-06-17 00:10 +0200
        Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with  0x in the printf format Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-06-17 00:30 +0200
          Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with  0x in the printf format Joe Perches <joe@perches.com> - 2015-06-17 02:00 +0200
    Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal  with 0x in the printf format David Miller <davem@davemloft.net> - 2015-06-21 18:40 +0200

csiph-web