LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Kyle McMartin <kyle@parisc-linux.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: resource_size_t printk whinging
Date: Tue, 27 Feb 2007 12:02:50 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.62.0702271201330.21803@pademelon.sonytel.be> (raw)
In-Reply-To: <20070227041648.GB13669@athena.road.mcmartin.ca>
On Mon, 26 Feb 2007, Kyle McMartin wrote:
> I submitted this patch a while ago, but nobody commented on it.
> All these casts of resource_size_t to (unsigned long long) seem horribly
> wasteful to me...
>
> Of course, to add a new format qualifier, we lose out on checking the format
> string by gcc... Nowadays, this role can be done by sparse.
But we don't run sparse on every build. We do run gcc (a lot).
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -477,6 +478,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
> num = (unsigned short) va_arg(args, int);
> if (flags & SIGN)
> num = (signed short) num;
> + } else if (qualifier == 'R' || qualifier == 'R') {
^ ^
One of them must be lowercase `r'.
> + num = va_arg(args, resource_size_t);
> } else {
> num = va_arg(args, unsigned int);
> if (flags & SIGN)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2007-02-27 11:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-27 4:16 Kyle McMartin
2007-02-27 11:02 ` Geert Uytterhoeven [this message]
2007-02-27 13:15 ` Kyle McMartin
2007-02-27 15:07 ` Tilman Schmidt
2007-02-27 19:39 ` Alexey Dobriyan
2007-02-27 17:42 ` H. Peter Anvin
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=Pine.LNX.4.62.0702271201330.21803@pademelon.sonytel.be \
--to=geert@linux-m68k.org \
--cc=kyle@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: resource_size_t printk whinging' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).