All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Joe Perches <joe@perches.com>
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, 5 Mar 2019 12:07:25 -0800	[thread overview]
Message-ID: <20190305200725.GG13380@bombadil.infradead.org> (raw)
In-Reply-To: <e244390e3d245c94d6d2fb036943e63111ada86d.camel@perches.com>

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.

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.


  reply	other threads:[~2019-03-05 20:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 12:36 [PATCH] docs: add extra integer types to printk-formats 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 [this message]
2019-03-05 20:11         ` Matthew Wilcox
2019-03-05 20:15         ` Joe Perches
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=20190305200725.GG13380@bombadil.infradead.org \
    --to=willy@infradead.org \
    --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=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis@kragniz.eu \
    --cc=ndesaulniers@google.com \
    --cc=pmladek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.