From: Joe Perches <joe@perches.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: RFC: script to convert vsprintf uses of %pf to %ps and %pF to %pS
Date: Mon, 26 Nov 2018 09:13:48 -0800 [thread overview]
Message-ID: <48bb15770ef1755a0210db8137045176864d2ece.camel@perches.com> (raw)
In-Reply-To: <20181126060824.GG540@jagdpanzerIV>
On Mon, 2018-11-26 at 15:08 +0900, Sergey Senozhatsky wrote:
> > There are approximately these total uses of the symbolic
> > lookup vsprintf extensions %p[SsFf]:
> >
> > $ git grep '".*[^%]%p[SsFf]' | \
> > grep -oh '%p[SsFf]' | sort | uniq -c | sort -rn
> > 231 %pS
> > 65 %ps
> > 60 %pf
> > 47 %pF
>
> I didn't bother to remove "pf/pF" because I didn't want to count on:
> a) everyone running checkpatch.pl
> b) everyone testing all printk-s they added
>
> I guess pf/pF still can sneak in.
Any use of %p<invalid_extension> could sneak in.
And thanks, the checkpatch test for %p<invalid_extensions>
should be updated too.
> But I don't have a really strong opinion on this. If general
> consensus is that we shall remove deprecated specifiers, then
> I'm fine.
I think converting deprecated things is generally good.
Also, the %p<extension> lettering space is limited, so
cleaning deprecated extensions is useful.
> After running this script I still have a bunch of leftovers:
>
> //
> // these two are probably not really relevant, but still - %pF/%pf
> //
> tools/lib/traceevent/event-parse.c: if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0)
> tools/lib/traceevent/event-parse.c: if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0)
I was not/am not sure about those.
> arch/um/kernel/sysrq.c: pr_info(" [<%08lx>] %s%pF\n", address, reliable ? "" : "? ",
> arch/x86/xen/multicalls.c: printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n",
> kernel/async.c: pr_debug("calling %lli_%pF @ %i\n",
> kernel/async.c: pr_debug("initcall %lli_%pF returned 0 after %lld usecs\n",
Missed those by using \b, thanks again.
next prev parent reply other threads:[~2018-11-26 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-25 9:13 Joe Perches
2018-11-26 5:35 ` Sergey Senozhatsky
2018-11-26 6:08 ` Sergey Senozhatsky
2018-11-26 17:13 ` Joe Perches [this message]
2018-11-30 16:58 ` Petr Mladek
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=48bb15770ef1755a0210db8137045176864d2ece.camel@perches.com \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.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®