From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <yellowriver2010@hotmail.com>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] [PATCH v2] coccinelle: semantic patch for missing put_device()
Date: Mon, 11 Feb 2019 13:07:11 +0100 [thread overview]
Message-ID: <d8491ed8-fe07-0f7c-126a-1146a22bdeb4@web.de> (raw)
In-Reply-To: <HK0PR02MB3634E85F5155655F3A5A20DBB26B0@HK0PR02MB3634.apcprd02.prod.outlook.com>
> + when != e4 = (T1)platform_get_drvdata(id)
> +(
> +return id;
> +|
> +return (T2)dev_get_drvdata(&id->dev);
> +|
> +return (T3)platform_get_drvdata(id);
> +|
> +return at p2 ...;
> +)
How do you think about to adjust this SmPL disjunction a bit like the following?
+ when != e4 = (T1)platform_get_drvdata(id)
+(
+ return
+( id
+| (T2)dev_get_drvdata(&id->dev)
+| (T3)platform_get_drvdata(id)
+)
+|return@p2 ...
+);
>> +coccilib.report.print_report(p2[0],msg)
Would you like to consider the message construction without using the extra Python variable “msg”?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2019-02-11 12:07 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 [this message]
[not found] ` <HK0PR02MB3634EB7F9772EFE770B142C0B2650@HK0PR02MB3634.apcprd02.prod.outlook.com>
2019-02-12 21:04 ` Markus Elfring
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=d8491ed8-fe07-0f7c-126a-1146a22bdeb4@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).