From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Himanshu Jha <himanshujha199640@gmail.com>,
Linus Torvalds <torvalds@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
tglx@linutronix.de, Marc Zyngier <maz@kernel.org>,
linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH] coccinelle: api/devm_platform_ioremap_resource: remove useless script
Date: Thu, 17 Oct 2019 16:22:37 +0200 [thread overview]
Message-ID: <20191017142237.9734-1-alexandre.belloni@bootlin.com> (raw)
While it is useful for new drivers to use devm_platform_ioremap_resource,
this script is currently used to spam maintainers, often updating very old
drivers. The net benefit is the removal of 2 lines of code in the driver
but the review load for the maintainers is huge. As of now, more that 560
patches have been sent, some of them obviously broken, as in:
https://lore.kernel.org/lkml/9bbcce19c777583815c92ce3c2ff2586@www.loen.fr/
Remove the script to reduce the spam.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
.../api/devm_platform_ioremap_resource.cocci | 60 -------------------
1 file changed, 60 deletions(-)
delete mode 100644 scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
diff --git a/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci b/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
deleted file mode 100644
index 56a2e261d61d..000000000000
--- a/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
+++ /dev/null
@@ -1,60 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/// Use devm_platform_ioremap_resource helper which wraps
-/// platform_get_resource() and devm_ioremap_resource() together.
-///
-// Confidence: High
-// Copyright: (C) 2019 Himanshu Jha GPLv2.
-// Copyright: (C) 2019 Julia Lawall, Inria/LIP6. GPLv2.
-// Keywords: platform_get_resource, devm_ioremap_resource,
-// Keywords: devm_platform_ioremap_resource
-
-virtual patch
-virtual report
-
-@r depends on patch && !report@
-expression e1, e2, arg1, arg2, arg3;
-identifier id;
-@@
-
-(
-- id = platform_get_resource(arg1, IORESOURCE_MEM, arg2);
-|
-- struct resource *id = platform_get_resource(arg1, IORESOURCE_MEM, arg2);
-)
- ... when != id
-- e1 = devm_ioremap_resource(arg3, id);
-+ e1 = devm_platform_ioremap_resource(arg1, arg2);
- ... when != id
-? id = e2
-
-@r1 depends on patch && !report@
-identifier r.id;
-type T;
-@@
-
-- T *id;
- ...when != id
-
-@r2 depends on report && !patch@
-identifier id;
-expression e1, e2, arg1, arg2, arg3;
-position j0;
-@@
-
-(
- id = platform_get_resource(arg1, IORESOURCE_MEM, arg2);
-|
- struct resource *id = platform_get_resource(arg1, IORESOURCE_MEM, arg2);
-)
- ... when != id
- e1@j0 = devm_ioremap_resource(arg3, id);
- ... when != id
-? id = e2
-
-@script:python depends on report && !patch@
-e1 << r2.e1;
-j0 << r2.j0;
-@@
-
-msg = "WARNING: Use devm_platform_ioremap_resource for %s" % (e1)
-coccilib.report.print_report(j0[0], msg)
--
2.21.0
next reply other threads:[~2019-10-17 14:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 14:22 Alexandre Belloni [this message]
2019-10-17 14:34 ` Julia Lawall
2019-10-17 16:13 ` Marc Zyngier
2019-10-19 11:35 ` Markus Elfring
2019-10-19 20:43 ` Marc Zyngier
2019-10-19 22:13 ` Joe Perches
2019-10-24 15:40 ` Masahiro Yamada
2019-10-24 18:30 ` Markus Elfring
2019-10-25 8:08 ` Andy Shevchenko
2019-10-25 8:38 ` Julia Lawall
2019-10-29 2:58 ` Masahiro Yamada
2019-10-29 8:55 ` Julia Lawall
2019-10-20 5:38 ` Julia Lawall
2019-10-20 9:34 ` Marc Zyngier
2019-10-20 5:45 ` Markus Elfring
2019-10-19 9:00 ` [PATCH] " Markus Elfring
2019-10-19 12:09 ` Alexandre Belloni
2019-10-19 14:06 ` Markus Elfring
2019-10-19 14:29 ` [PATCH] " Bartosz Golaszewski
2019-10-19 16:36 ` 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=20191017142237.9734-1-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=Julia.Lawall@lip6.fr \
--cc=arnd@arndb.de \
--cc=himanshujha199640@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linuxfoundation.org \
/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
Powered by JetHome