Re: [PATCH v4 10/11] lib/vsprintf: Add %pfw conversion specifier for printing fwnode names
From: Andy Shevchenko
Date: Wed Sep 04 2019 - 11:18:05 EST
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