From: Markus Elfring <Markus.Elfring@web.de>
To: Yang Wen <yellowriver2010@hotmail.com>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] [PATCH v2] coccinelle: semantic patch for missing put_device()
Date: Tue, 12 Feb 2019 22:04:42 +0100 [thread overview]
Message-ID: <c3e83c92-a2de-d16a-e5a3-db5415ba64f1@web.de> (raw)
In-Reply-To: <HK0PR02MB3634EB7F9772EFE770B142C0B2650@HK0PR02MB3634.apcprd02.prod.outlook.com>
> For c programmers, the first way of writing may be easier to understand;
I suggest the reduction of a bit of redundant C code within
SmPL search specifications.
> in addition, the second way, its two brackets are not well aligned.
There can be different preferences for the SmPL coding style
around nested disjunctions.
> Msg has a lot of chars more than one line, it will also add the line number in p1/p2 into msg.
> If we remove the msg variable, the print_report function may be more complicated.
The message text can be also rearranged on separate lines
without additional variables for such simple commands, can't it?
> In addition, we see that many cocci also have msg variables.
Do you know further possibilities for longer string literals (in Python)?
https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
prev parent reply other threads:[~2019-02-12 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 4:56 [Cocci] [PATCH v2] coccinelle: semantic patch for missing put_device() Wen Yang
2019-02-11 12:07 ` Markus Elfring
[not found] ` <HK0PR02MB3634EB7F9772EFE770B142C0B2650@HK0PR02MB3634.apcprd02.prod.outlook.com>
2019-02-12 21:04 ` Markus Elfring [this message]
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=c3e83c92-a2de-d16a-e5a3-db5415ba64f1@web.de \
--to=markus.elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=yellowriver2010@hotmail.com \
/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).