public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Louis Taylor <louis@kragniz.eu>
Cc: corbet@lwn.net, pmladek@suse.com, geert+renesas@glider.be,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com, ndesaulniers@google.com,
	jflat@chromium.org
Subject: Re: [PATCH] docs: add extra integer types to printk-formats
Date: Sun, 3 Mar 2019 22:10:16 +0200	[thread overview]
Message-ID: <20190303201016.GO9224@smile.fi.intel.com> (raw)
In-Reply-To: <20190303123647.22020-1-louis@kragniz.eu>

On Sun, Mar 03, 2019 at 12:36:47PM +0000, Louis Taylor wrote:
> A few commonly used integer types were absent from this table, so add
> them.

I'm not against the patch, but isn't obvious by reading POSIX and / or man
printf(3)?

> Link: https://github.com/ClangBuiltLinux/linux/issues/378

Thanks for the link.

It's interesting to see how compiler type mindset applies to fixing drivers and
hardware related code...

> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Louis Taylor <louis@kragniz.eu>
> ---
>  Documentation/core-api/printk-formats.rst | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
> index a7fae4538946..6f08b1b6240a 100644
> --- a/Documentation/core-api/printk-formats.rst
> +++ b/Documentation/core-api/printk-formats.rst
> @@ -19,8 +19,16 @@ Integer types
>  		unsigned long		%lu or %lx
>  		long long		%lld or %llx
>  		unsigned long long	%llu or %llx
> +		short int		%hd or %hx
> +		unsigned short int	%hu or %hx
> +		char			%hhd or %hhx
> +		unsigned char		%hhu or %hhx
>  		size_t			%zu or %zx
>  		ssize_t			%zd or %zx
> +		s8			%hhd or %hhx
> +		u8			%hhu or %hhx
> +		s16			%hd or %hx
> +		u16			%hu or %hx
>  		s32			%d or %x
>  		u32			%u or %x
>  		s64			%lld or %llx
> -- 
> 2.20.1
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2019-03-03 20:10 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 [this message]
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
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=20190303201016.GO9224@smile.fi.intel.com \
    --to=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 \
    /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