From: Joe Perches <joe@perches.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Louis Taylor <louis@kragniz.eu>, Jonathan Corbet <corbet@lwn.net>,
pmladek@suse.com, geert+renesas@glider.be,
linux-doc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
clang-built-linux@googlegroups.com,
Jon Flatley <jflat@chromium.org>
Subject: Re: [PATCH] docs: add extra integer types to printk-formats
Date: Tue, 05 Mar 2019 12:15:08 -0800 [thread overview]
Message-ID: <c0ecfffb979efbe38dd02d843c175d40342e40ed.camel@perches.com> (raw)
In-Reply-To: <20190305200725.GG13380@bombadil.infradead.org>
On Tue, 2019-03-05 at 12:07 -0800, Matthew Wilcox wrote:
> On Tue, Mar 05, 2019 at 11:59:30AM -0800, Joe Perches wrote:
> > Many of the -Wformat warnings are bogus too.
> >
> > There's nothing wrong with using %x for a unsigned int
> > of less than long size. (u8/u16)
>
> I believe you to be incorrect.
>
> 6.5.2.2 Function calls
>
> 7 If the expression that denotes the called function has a type that does
> include a prototype, the arguments are implicitly converted, as if by
> assignment, to the types of the corresponding parameters, taking the
> type of each parameter to be the unqualified version of its declared
> type. The ellipsis notation in a function prototype declarator causes
> argument type conversion to stop after the last declared parameter. The
> default argument promotions are performed on trailing arguments.
Look at default argument promotions for varargs functions.
(integer promotions)
> I could define a calling convention for my CPU which says to pack u8s
> and u16s as tightly as possible in registers (or on the stack), rather
> than the prevailing calling convention of having each argument take up
> at least one register-sized slot.
Doesn't matter for varargs. See above.
cheers, Joe
next prev parent reply other threads:[~2019-03-05 20:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-03 12:36 Louis Taylor
2019-03-03 20:10 ` Andy Shevchenko
2019-03-04 17:59 ` Nick Desaulniers
2019-03-05 19:59 ` Joe Perches
2019-03-05 20:07 ` Matthew Wilcox
2019-03-05 20:11 ` Matthew Wilcox
2019-03-05 20:15 ` Joe Perches [this message]
2019-03-05 21:00 ` Randy Dunlap
2019-03-04 15:45 ` Petr Mladek
2019-03-04 17:54 ` Nick Desaulniers
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=c0ecfffb979efbe38dd02d843c175d40342e40ed.camel@perches.com \
--to=joe@perches.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=corbet@lwn.net \
--cc=geert+renesas@glider.be \
--cc=jflat@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis@kragniz.eu \
--cc=ndesaulniers@google.com \
--cc=pmladek@suse.com \
--cc=willy@infradead.org \
/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®