lkml.org 
[lkml]   [2019]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 10/11] lib/vsprintf: Add %pfw conversion specifier for printing fwnode names
On Wed, Sep 04, 2019 at 06:04:13PM +0300, Sakari Ailus wrote:
> On Tue, Sep 03, 2019 at 03:06:07PM +0200, Petr Mladek wrote:
> > On Mon 2019-09-02 11:32:39, Sakari Ailus wrote:
> > > Add support for %pfw conversion specifier (with "f" and "P" modifiers) to
> > > support printing full path of the node, including its name ("f") and only
> > > the node's name ("P") in the printk family of functions. The two flags
> > > have equivalent functionality to existing %pOF with the same two modifiers
> > > ("f" and "P") on OF based systems. The ability to do the same on ACPI
> > > based systems is added by this patch.

> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -5995,7 +5995,8 @@ sub process {
> > > while ($fmt =~ /(\%[\*\d\.]*p(\w))/g) {
> > > $specifier = $1;
> > > $extension = $2;
> > > - if ($extension !~ /[SsBKRraEhMmIiUDdgVCbGNOxt]/) {
> > > + if ($extension !~ /[SsBKRraEhMmIiUDdgVCbGNOxtf]/ ||
> > > + $extension =~ /^f[^w]/) {
> >
> > This does not work. $extension seems to have only one character.
>
> Good catch. \w indeed matches a single letter; I'll change that to \w+ and
> change the other uses accordingly.

It's weird. \w stands for word matching. How can it match one letter only?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2019-09-04 17:19    [W:0.103 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site