[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 9 Sep 2018 13:13:25 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Corentin Labbe <clabbe@...libre.com>,
kernel-janitors@...r.kernel.org
Cc: Coccinelle <cocci@...teme.lip6.fr>,
linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-sunxi@...glegroups.com,
linuxppc-dev@...ts.ozlabs.org, netdev@...r.kernel.org,
Alexandre Torgue <alexandre.torgue@...com>,
Alistair Popple <alistair@...ple.id.au>,
Anatolij Gustschin <agust@...x.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Carlo Caione <carlo@...one.org>, Chen-Yu Tsai <wens@...e.org>,
"David S. Miller" <davem@...emloft.net>,
Gilles Muller <Gilles.Muller@...6.fr>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Jose Abreu <joabreu@...opsys.com>,
Julia Lawall <julia.lawall@...6.fr>,
Kevin Hilman <khilman@...libre.com>,
Kumar Gala <galak@...nel.crashing.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Matt Porter <mporter@...nel.crashing.org>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Michael Ellerman <mpe@...erman.id.au>,
Michal Marek <michal.lkml@...kovi.net>,
Nicolas Palix <nicolas.palix@...g.fr>,
Paul Mackerras <paulus@...ba.org>,
Scott Wood <oss@...error.net>, Tejun Heo <tj@...nel.org>,
Vitaly Bordug <vitb@...nel.crashing.org>
Subject: Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
How do you think about to add any more meta-data for this semantic patch script?
* SPDX identifier
* Copyright information
* Confidence level
https://bottest.wiki.kernel.org/coccicheck
> +virtual context
Further variables will be needed if you would like to use corresponding
operation modes (besides “patch”).
> +expression reg;
> +expression set;
> +expression clear;
I propose once more to avoid the repetition of (unnecessary) SmPL code.
This part could be written like the following instead.
+expression clear, set, reg;
If you would increase the usage of SmPL disjunctions, the specification
of duplicate SmPL code could be reduced considerably.
* Would you like to merge SmPL rules based on the distinction between
the data types “u32” and “u64”?
* Did you identify any optional code in this transformation approach?
> +@@
> +expression base;
> +expression offset;
> +expression value;
> +@@
> +
> +- mtu3_setbits(base, offset, value);
> ++ setbits32(base + offset, value);
> +
> +@@
> +expression base;
> +expression offset;
> +expression mask;
> +@@
> +
> +- mtu3_clrbits(base, offset, mask);
> ++ clrbits32(base + offset, mask);
Another update suggestion:
+@...lacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+- ,
++ +
+ offset, ...);
Would you like to try further software fine-tuning out?
Regards,
Markus
Powered by blists - more mailing lists