From: timur@kernel.org (Timur Tabi)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Problem with improper multi-line string literals
Date: Fri, 12 Oct 2018 18:22:29 -0500 [thread overview]
Message-ID: <CAOZdJXUs=A=Wrh_bb1jDCtRr123BVH422ozVZ-z1W8PmNNCd0g@mail.gmail.com> (raw)
In-Reply-To: <CAOZdJXXcSEc0XkX-k=omA_yf4_SZFMYXmZwVXGcsjVRf+jhrDg@mail.gmail.com>
On Fri, Oct 12, 2018 at 6:08 PM Timur Tabi <timur@kernel.org> wrote:
> - DBG_PRINTF((DBG_MODULE_OS, DBG_LEVEL_ERRORS,
> - "NVRM: %s: this is a test \
> - of multiline " NvP64_fmt " strings %p\n",
> - __FUNCTION__,
> - p1,
> - p2));
> + NV_PRINTF(LEVEL_ERROR,
> + "this is a test of multiline " NvP64_fmt " strings %p\n",
> + p1, p2);
>
>
> - NV_PRINTF(LEVEL_INFO, "%s\n", __FUNCTION__);
> + NV_PRINTF(LEVEL_INFO, "\n");
>
> That second diff should not be there.
>
> Looking at the output of --debug, I see it go through all the rules
> and tell me what dependencies are satisfied, but it only does it once.
> I would expect Coccinelle to re-evaluate all the rules for every line
> of code it sees. My script used to do that, so I broke it somehow.
The weird thing is that if I remove the DBG_PRINTF(()) line in test.c,
then the NV_PRINTF() line is *not* modified. It's as if Coccinelle
doesn't reset the dependencies when it evaluates the NV_PRINTF() line.
next prev parent reply other threads:[~2018-10-12 23:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 21:28 [Cocci] Problem with improper multi-line string literals Timur Tabi
2018-10-12 21:37 ` Julia Lawall
2018-10-12 21:42 ` Timur Tabi
2018-10-12 22:24 ` Timur Tabi
2018-10-12 23:08 ` Timur Tabi
2018-10-12 23:22 ` Timur Tabi [this message]
2018-10-13 3:08 ` Julia Lawall
[not found] ` <e4e5dc37-c364-c53d-26f6-52205cfee304@users.sourceforge.net>
2018-10-13 15:56 ` Timur Tabi
2018-10-13 21:19 ` Julia Lawall
2018-10-15 16:37 ` Timur Tabi
2018-10-15 16:39 ` Julia Lawall
2018-10-15 16:50 ` Timur Tabi
2018-10-15 16:55 ` Julia Lawall
2018-10-15 18:35 ` Timur Tabi
2018-10-16 15:10 ` Himanshu Jha
2018-10-16 15:12 ` Julia Lawall
2018-10-16 16:28 ` Timur Tabi
2018-10-16 16:39 ` Julia Lawall
2018-10-16 17:14 ` Timur Tabi
2018-10-16 17:10 ` Himanshu Jha
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='CAOZdJXUs=A=Wrh_bb1jDCtRr123BVH422ozVZ-z1W8PmNNCd0g@mail.gmail.com' \
--to=timur@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).