From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Luca Weiss <luca.weiss@fairphone.com>
Cc: Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Jonathan Corbet <corbet@lwn.net>,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: printk-formats: Clarify %*pb format parameters
Date: Wed, 17 May 2023 19:19:32 +0300 [thread overview]
Message-ID: <ZGT+lJasWhZ0TPRi@smile.fi.intel.com> (raw)
In-Reply-To: <20230516-printk-bitmap-v1-1-d5f810192a10@fairphone.com>
On Tue, May 16, 2023 at 08:52:43AM +0200, Luca Weiss wrote:
> Since it's rather unusual for printk formats to require two parameters,
I don't think this is "unusual". The %*... is very well described in the
printf(3) (the meaning of *). It applies here for %*p... as well.
> expand the documentation to clearly mention that in the printk format
> for bitmaps.
>
> As an extra example, for example from include/net/bluetooth/hci_core.h
> we have a bitmap DECLARE_BITMAP(dev_flags, __HCI_NUM_FLAGS);
> This can be printed with ("%*pb", __HCI_NUM_FLAGS, hdev->dev_flags)
I think this change is not needed. But try to convince PRINTK maintainers.
Maybe they will be okay with it if it covers all %*p... cases (like %*ph).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-05-17 16:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 6:52 [PATCH] docs: printk-formats: Clarify %*pb format parameters Luca Weiss
2023-05-17 16:19 ` Andy Shevchenko [this message]
2023-05-22 6:41 ` Luca Weiss
2023-05-22 15:08 ` [PATCH] vsprintf/doc: Document format flags including field width and precision Petr Mladek
2023-05-22 21:04 ` Rasmus Villemoes
2023-05-24 8:08 ` John Ogness
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=ZGT+lJasWhZ0TPRi@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=luca.weiss@fairphone.com \
--cc=phone-devel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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