From: wsa@the-dreams.de (Wolfram Sang)
To: cocci@systeme.lip6.fr
Subject: [Cocci] how to debug missing match?
Date: Sun, 21 Dec 2014 11:51:16 +0100 [thread overview]
Message-ID: <20141221105116.GC1081@katana> (raw)
In-Reply-To: <alpine.DEB.2.02.1412211138100.2068@localhost6.localdomain6>
On Sun, Dec 21, 2014 at 11:39:14AM +0100, Julia Lawall wrote:
> On Sun, 21 Dec 2014, Wolfram Sang wrote:
>
> >
> > > does not result in anything although three drivers should match IMO with
> > > the same pattern as the pmu driver above. Both use
> > > platform_driver_register() and both have the .owner field set.
> > >
> > > drivers/macintosh/windfarm_pm112.c
> > > drivers/macintosh/windfarm_pm72.c
> > > drivers/macintosh/windfarm_rm31.c
> > >
> > > How can I debug why the match does not occur?
> >
> > So, I found "--verbose-parsing" to be helpful which gives me:
> >
> > parse error
> > = File "drivers/macintosh/windfarm_pm112.c", line 685, column 4, charpos = 17702
> > around = 'nr_cores', whole content = ++nr_cores;
> >
> > which basically means that it can't handle for_each_node_by_type()?
> >
> > bad: for_each_node_by_type(cpu, "cpu")
> > BAD:!!!!! ++nr_cores;
> >
> > But neither "--include include/linux/of.h" nor "--recursive-includes"
> > does help the case for me?
>
> It is not surprising that adding more includes doesn't help. But I would
> have thought that for_each_node_by_type, as it begins with for, would be
> something that it would pick up on. I will take a look.
How does coccinelle work with such constructs? I'd think that replacing
that #define with the actual for()-construct is much more reliable than
an assumption like "it starts with 'for' so it is probably...' :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20141221/81a1a83a/attachment.asc>
next prev parent reply other threads:[~2014-12-21 10:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-21 9:53 [Cocci] how to debug missing match? Wolfram Sang
2014-12-21 10:20 ` Wolfram Sang
2014-12-21 10:39 ` Julia Lawall
2014-12-21 10:51 ` Wolfram Sang [this message]
2014-12-21 10:55 ` Julia Lawall
2014-12-21 11:15 ` Julia Lawall
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=20141221105116.GC1081@katana \
--to=wsa@the-dreams.de \
--cc=cocci@systeme.lip6.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.