From: ttabi@nvidia.com (Timur Tabi)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Compacting parameters into fewer lines
Date: Tue, 31 Jul 2018 14:48:34 -0500 [thread overview]
Message-ID: <650a688e-b34d-4944-9484-249da36fb1c3@nvidia.com> (raw)
In-Reply-To: <2efc7722-b133-79e6-df1e-7b489213c5fd@users.sourceforge.net>
On 07/31/2018 11:12 AM, SF Markus Elfring wrote:
> @rule1@
> expression x;
> expression list y;
> @@
> -DBG_PRINTF
> +NV_PRINTF
> (
> - (x),
> y);
This doesn't work:
- DBG_PRINTF((DBG_MODULE_OS, DEBUGLEVEL_ERRORS,
- "NVRM: x86emu: int $%d (eax = %08x)\n", num, M.x86.R_EAX));
+ NV_PRINTF();
> @A depends on rule1@
> @@
> NV_PRINTF(...,
> - \(DBG_LEVEL_INFO \| DEBUGLEVEL_TRACEINFO \| DBG_LEVEL_SETUPINFO \| DEBUGLEVEL_SETUPINFO\)
> + LEVEL_INFO
> , ...);
This does work, thanks.
> Do you find such SmPL code adjustments useful?
Yes, thank you. I always appreciate optimization suggestions.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
next prev parent reply other threads:[~2018-07-31 19:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 14:27 [Cocci] Compacting parameters into fewer lines Timur Tabi
2018-07-31 14:33 ` Julia Lawall
2018-07-31 15:03 ` Timur Tabi
2018-07-31 15:18 ` Julia Lawall
2018-07-31 15:34 ` Timur Tabi
2018-07-31 16:12 ` SF Markus Elfring
2018-07-31 19:48 ` Timur Tabi [this message]
2018-08-01 6:08 ` SF Markus Elfring
2018-08-01 6:17 ` Julia Lawall
2018-08-02 20:32 ` Timur Tabi
2018-07-31 19:21 ` 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=650a688e-b34d-4944-9484-249da36fb1c3@nvidia.com \
--to=ttabi@nvidia.com \
--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).