Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965422AbbFCRS0 (ORCPT ); Wed, 3 Jun 2015 13:18:26 -0400 Received: from smtprelay0093.hostedemail.com ([216.40.44.93]:43900 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933184AbbFCRGm (ORCPT ); Wed, 3 Jun 2015 13:06:42 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2559:2562:2731:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3872:3873:3874:4225:4321:5007:6261:8603:10004:10400:10848:11026:11658:11914:12114:12296:12438:12517:12519:12740:13069:13138:13231:13255:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: crib47_1cb4712e4a546 X-Filterd-Recvd-Size: 1908 Message-ID: <1433351196.4861.131.camel@perches.com> Subject: Re: [PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses From: Joe Perches To: Julien Grall Cc: xen-devel@lists.xenproject.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, linux-kernel@vger.kernel.org, David Vrabel , Konrad Rzeszutek Wilk , Boris Ostrovsky , netdev@vger.kernel.org Date: Wed, 03 Jun 2015 10:06:36 -0700 In-Reply-To: <1433350510-12846-2-git-send-email-julien.grall@citrix.com> References: <1433350510-12846-1-git-send-email-julien.grall@citrix.com> <1433350510-12846-2-git-send-email-julien.grall@citrix.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 998 Lines: 25 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/