Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1157846 > unrolled thread
| Started by | Julien Grall <julien.grall@citrix.com> |
|---|---|
| First post | 2015-06-03 19:00 +0200 |
| Last post | 2015-06-03 19:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses Julien Grall <julien.grall@citrix.com> - 2015-06-03 19:00 +0200
Re: [PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses Joe Perches <joe@perches.com> - 2015-06-03 19:20 +0200
| From | Julien Grall <julien.grall@citrix.com> |
|---|---|
| Date | 2015-06-03 19:00 +0200 |
| Subject | [PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses |
| Message-ID | <pxkbh-71b-25@gated-at.bofh.it> |
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.
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 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..c9768f8 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: %x, 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/
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2015-06-03 19:20 +0200 |
| Subject | Re: [PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses |
| Message-ID | <pxkuE-7Ey-53@gated-at.bofh.it> |
| In reply to | #1157846 |
On Wed, 2015-06-03 at 17:55 +0100, Julien Grall wrote:
> 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.
[]
> diff --git 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: %x, size: %d\n",
If you're going to do this, perhaps it'd be sensible to
also change the %x to %#x or 0x%x so that people don't
mistake offset without an [a-f] for decimal.
> rx->offset, rx->status);
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web