linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Juergen Gross <jgross@suse.com>, Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Jonathan Corbet <corbet@lwn.net>,
	metux IT consult Enrico Weigelt <lkml@metux.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] vsprintf: introduce %dE for error constants
Date: Thu, 29 Aug 2019 19:39:45 +0200	[thread overview]
Message-ID: <002dc2a7-40a3-f52a-c8fa-5dbb42e6dd7b@kleine-koenig.org> (raw)
In-Reply-To: <a83449cf-3a4a-f3e0-210a-dc7c39505355@rasmusvillemoes.dk>


[-- Attachment #1.1: Type: text/plain, Size: 1404 bytes --]

On 8/29/19 11:09 AM, Rasmus Villemoes wrote:
> On 29/08/2019 10.27, Juergen Gross wrote:
>> On 29.08.19 10:12, Petr Mladek wrote:
>>> On Wed 2019-08-28 21:18:37, Uwe Kleine-König  wrote:
>>>>
>>>> I'd like to postpone the discussion about "how" until we agreed about
>>>> the "if at all".
>>>
>>> It seems that all people like this feature.
>>
>> Hmm, what about already existing format strings conatining "%dE"?
>>
>> Yes, I could find only one (drivers/staging/speakup/speakup_bns.c), but
>> nevertheless...
> 
> Indeed, Uwe still needs to respond to how he wants to handle that. I

This is indeed bad and I didn't expect that. I just took a quick look
and this string is indeed used as sprintf format string.

> still prefer making it %pE, both because it's easier to convert integers
> to ERR_PTRs than having to worry about the type of PTR_ERR() being long
> and not int, and because alphanumerics after %p have been ignored for a
> long time (10 years?) whether or not those characters have been
> recognized as a %p extension, so nobody relies on %pE putting an E after
> the %p output. It also keeps the non-standard extensions in the same
> "namespace", so to speak.
> 
> Oh, 'E' is taken, well, make it 'e' then.

I like having %pe to print error valued pointers. Then maybe we could
have both %de for ints and %pe for pointers. :-)

Best regards
Uwe




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-08-29 17:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 21:12 [PATCH v2] vsprintf: introduce %dE for error constants Uwe Kleine-König
2019-08-27 21:17 ` Uwe Kleine-König
2019-08-27 21:22 ` Joe Perches
2019-08-27 21:35   ` Uwe Kleine-König
2019-08-27 23:10     ` Joe Perches
2019-08-28 11:32 ` Petr Mladek
2019-08-28 11:54   ` Jani Nikula
2019-08-28 12:02     ` Sergey Senozhatsky
2019-08-28 12:49       ` Rasmus Villemoes
2019-08-28 12:59         ` Sergey Senozhatsky
2019-08-28 16:22           ` Uwe Kleine-König
2019-08-29  0:27             ` Sergey Senozhatsky
2019-08-28 19:18   ` Uwe Kleine-König
2019-08-29  8:12     ` Petr Mladek
2019-08-29  8:27       ` Juergen Gross
2019-08-29  9:09         ` Rasmus Villemoes
2019-08-29 17:39           ` Uwe Kleine-König [this message]
2019-08-30  9:06             ` Petr Mladek
2019-08-30 15:47               ` Uwe Kleine-König
2019-08-30 21:45             ` Rasmus Villemoes
2019-08-29  9:00       ` Rasmus Villemoes
2019-08-28 19:59   ` Uwe Kleine-König
2019-08-28 20:51     ` Mark Brown
2019-08-29 13:39 ` Andy Shevchenko

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=002dc2a7-40a3-f52a-c8fa-5dbb42e6dd7b@kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@linux.intel.com \
    --cc=jgross@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lkml@metux.net \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.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;
as well as URLs for NNTP newsgroup(s).