mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: "Rafał Miłecki" <rafal@milecki.pl>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Marek Vasut" <marek.vasut@gmail.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Cyrille Pitchen" <cyrille.pitchen@wedev4u.fr>,
	linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][mtd-next] mtd: parser: print hex size_t value using correct %zx printk format specifier
Date: Fri, 23 Jun 2017 19:21:30 +0100	[thread overview]
Message-ID: <01d71e7a-056a-7527-3c75-94d80b79b4dc@canonical.com> (raw)
In-Reply-To: <20170623181524.GB55942@google.com>

On 23/06/17 19:15, Brian Norris wrote:
> On Fri, Jun 23, 2017 at 07:03:11PM +0100, Colin Ian King wrote:
>> On 23/06/17 18:51, Brian Norris wrote:
>>> On Fri, Jun 23, 2017 at 12:02:34PM +0200, Rafał Miłecki wrote:
>>>> On 2017-06-23 11:00, Colin King wrote:
>>>>> From: Colin Ian King <colin.king@canonical.com>
>>>>>
>>>>> Use %zx instead of %X for size_t variable offset, fixes build warning:
>>>>>
>>>>> warning: format '%X' expects argument of type 'unsigned int', but
>>>>> argument
>>>>> 2 has type 'size_t {aka long unsigned int}' [-Wformat=]
>>>>>
>>>>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>>>>
>>>> I sent similar patch few hours earlier:
>>>> [PATCH] mtd: parsers: trx: fix pr_err format for printing offset
>>>> https://patchwork.ozlabs.org/patch/779789/
>>>>
>>>> Brian: you may pick the one with nicer commit message, whichever one you
>>>> prefer :)
>>>
>>> I'll go with:
>>> (a) the earlier one and
>>> (b) the one that doesn't change 'X' to 'x'
>>>
>>> That means Rafał, you're our lucky winner today! Thanks for playing,
>>> Colin.
>>
>> FYI, I used %zx rather than %zX as couldn't find any instances of it in
>> the kernel and I wasn't 100% sure if it was supported or not.
> 
> 'x' and 'X' are handled nearly identically in lib/vsprintf.c. Don't see
> why it wouldn't be.
> 
>> linux-next:
>>
>> $ git grep "%zx" | wc -l
>> 161
>>
>> $ git grep "%zX" | wc -l
>> 0
> 
> Yay, we're unique!
> 
> Seriously though: I don't really care which one is used (though I guess
> I'm personally more used to lower-case hex). I just figured the less
> churn the better.

That's fine by me too.
> 
> Brian
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2017-06-23 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23  9:00 Colin King
2017-06-23 10:02 ` Rafał Miłecki
2017-06-23 17:51   ` Brian Norris
2017-06-23 18:03     ` Colin Ian King
2017-06-23 18:15       ` Brian Norris
2017-06-23 18:21         ` Colin Ian King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01d71e7a-056a-7527-3c75-94d80b79b4dc@canonical.com \
    --to=colin.king@canonical.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®