Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753050AbbFEMfJ (ORCPT ); Fri, 5 Jun 2015 08:35:09 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:2420 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751917AbbFEMfH (ORCPT ); Fri, 5 Jun 2015 08:35:07 -0400 X-IronPort-AV: E=Sophos;i="5.13,558,1427760000"; d="scan'208";a="272028609" Message-ID: <55719752.2070909@citrix.com> Date: Fri, 5 Jun 2015 13:34:26 +0100 From: Julien Grall User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Joe Perches CC: David Vrabel , , , , , , "Boris Ostrovsky" Subject: Re: [Xen-devel] [PATCH v2 1/2] net/xen-netfront: Correct printf format in xennet_get_responses References: <1433350510-12846-1-git-send-email-julien.grall@citrix.com> <1433350510-12846-2-git-send-email-julien.grall@citrix.com> <1433351196.4861.131.camel@perches.com> <5570484C.8040201@citrix.com> <557048B1.9070805@citrix.com> <55704A02.9010001@citrix.com> <1433435132.4861.184.camel@perches.com> In-Reply-To: <1433435132.4861.184.camel@perches.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1810 Lines: 47 On 04/06/15 17:25, Joe Perches wrote: > On Thu, 2015-06-04 at 13:52 +0100, Julien Grall wrote: >> On 04/06/15 13:46, David Vrabel wrote: >>> On 04/06/15 13:45, Julien Grall wrote: >>>> On 03/06/15 18:06, Joe Perches wrote: >>>>> 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. >>>> >>>> Good idea. I will resend a version of this series. >>>> >>>> David, can I keep you Reviewed-by for this change?# >>> >>> Can you make the offset %d instead? > > If you do, please change similar uses in > drivers/net/xen-netback/ in the same patch. The format is not really consistent accross the 2 drivers and even within the same driver (see pending_idx which is some times print with %x and %d). Anyway, ss it's a different drivers and maintainers I will prefer to send a separate patch for this. Regards, -- Julien Grall -- 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/