[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180406235214.GA386@tigerII.localdomain>
Date: Sat, 7 Apr 2018 08:52:14 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
Petr Mladek <pmladek@...e.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Tobin C . Harding" <me@...in.cc>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.cz>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/9] vsprintf: Consolidate handling of unknown pointer
specifiers
On (04/05/18 16:55), Joe Perches wrote:
> On Thu, 2018-04-05 at 16:45 -0700, Joe Perches wrote:
> > On Thu, 2018-04-05 at 16:25 +0200, Rasmus Villemoes wrote:
> > > Even just git grep -1 -E '%p"$' finds %pt and %po
> > > which should get fixed before somebody claims those extensions.
> >
> > Neither %pt nor %po is used in a vsprintf
> > in the kernel.
>
> Nope, you are right, both are defectively used in the
> kernel via string concatenation.
>
> Also there's a missing space in a concatenation adjacent.
Can we tweak checkpatch to catch such things?
Hm... *Probably* also wouldn't hurt if checkpatch can require at least
one character after pointer format specifiers:
printk("string %p" vs printk("string %p "
" Object\n", ptr); "Object\n", ptr);
Especially if we can have a "potential" %px, like here
dev_vdbg(&md->input->dev,
"%s: *axis=%02X(%d) size=%d max=%08X xy_data=%p"
" xy_data[%d]=%02X(%d) bofs=%d\n",
or here
dev_vdbg(&md->input->dev,
"%s: *axis=%02X(%d) size=%d max=%08X xy_data=%p"
" xy_data[%d]=%02X(%d)\n",
Opinions?
-ss
Powered by blists - more mailing lists