Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757239AbbFPW33 (ORCPT ); Tue, 16 Jun 2015 18:29:29 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:33447 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752421AbbFPW3V (ORCPT ); Tue, 16 Jun 2015 18:29:21 -0400 Message-ID: <5580A33C.4040007@cogentembedded.com> Date: Wed, 17 Jun 2015 01:29:16 +0300 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Joe Perches CC: Julien Grall , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Wei Liu , Ian Campbell , netdev@vger.kernel.org Subject: Re: [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with 0x in the printf format References: <1434481848-26387-1-git-send-email-julien.grall@citrix.com> <1434481848-26387-4-git-send-email-julien.grall@citrix.com> <5580821D.4080408@cogentembedded.com> <1434492550.2689.8.camel@perches.com> In-Reply-To: <1434492550.2689.8.camel@perches.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1227 Lines: 39 Hello. On 06/17/2015 01:09 AM, Joe Perches wrote: >>> Append 0x to all %x in order to avoid while reading when there is other >>> decimal value in the log. > [] >>> @@ -874,7 +874,7 @@ static inline void xenvif_grant_handle_set(struct xenvif_queue *queue, >>> if (unlikely(queue->grant_tx_handle[pending_idx] != >>> NETBACK_INVALID_HANDLE)) { >>> netdev_err(queue->vif->dev, >>> - "Trying to overwrite active handle! pending_idx: %x\n", >>> + "Trying to overwrite active handle! pending_idx: 0x%x\n", >> Using "%#x" is shorter ind does the same. > That's true, but it's also far less common. Which is a pity... People just don't know the format specifiers well enough. :-( > $ git grep -E "%#[\*\d\.]*x" | wc -l > 1419 > $ git grep "0x%" | wc -l > 29844 Which means 29 KB could theoretically be saved on allyesconfig build. :-) (Actually less since the width specifiers will likely need to be fixed where present.) WBR, Sergei -- 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/