All of lore.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Corentin Labbe <clabbe@baylibre.com>, kernel-janitors@vger.kernel.org
Cc: Coccinelle <cocci@systeme.lip6.fr>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Alistair Popple <alistair@popple.id.au>,
	Anatolij Gustschin <agust@denx.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Carlo Caione <carlo@caione.org>, Chen-Yu Tsai <wens@csie.org>,
	"David S. Miller" <davem@davemloft.net>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Kevin Hilman <khilman@baylibre.com>,
	Kumar Gala <galak@kernel.crashing.org>
Subject: Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 9 Sep 2018 13:13:25 +0200	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+@replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Corentin Labbe <clabbe@baylibre.com>, kernel-janitors@vger.kernel.org
Cc: Coccinelle <cocci@systeme.lip6.fr>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Alistair Popple <alistair@popple.id.au>,
	Anatolij Gustschin <agust@denx.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Carlo Caione <carlo@caione.org>, Chen-Yu Tsai <wens@csie.org>,
	"David S. Miller" <davem@davemloft.net>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Kevin Hilman <khilman@baylibre.com>,
	Kumar Gala <galak@kernel.crashing.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Matt Porter <mporter@kernel.crashing.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Paul Mackerras <paulus@samba.org>, Scott Wood <oss@buserror.net>,
	Tejun Heo <tj@kernel.org>,
	Vitaly Bordug <vitb@kernel.crashing.org>
Subject: Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 9 Sep 2018 13:13:25 +0200	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+@replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Corentin Labbe <clabbe@baylibre.com>, kernel-janitors@vger.kernel.org
Cc: Coccinelle <cocci@systeme.lip6.fr>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
	linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Alistair Popple <alistair@popple.id.au>,
	Anatolij Gustschin <agust@denx.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Carlo Caione <carlo@caione.org>, Chen-Yu Tsai <wens@csie.org>,
	"David S. Miller" <davem@davemloft.net>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Kevin Hilman <khilman@baylibre.com>,
	Kumar Gala <galak@kernel.crashing.org>,
Subject: Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 9 Sep 2018 13:13:25 +0200	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+@replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linus-amlogic@lists.infradead.org
Subject: Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 09 Sep 2018 11:13:25 +0000	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+@replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 9 Sep 2018 13:13:25 +0200	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+ at replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

WARNING: multiple messages have this Message-ID (diff)
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch
Date: Sun, 9 Sep 2018 13:13:25 +0200	[thread overview]
Message-ID: <463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net> (raw)
In-Reply-To: <1536349307-20714-4-git-send-email-clabbe@baylibre.com>

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:

+ at replacement@
+expression base, offset;
+@@
+(
+-mtu3_clrbits
++clrbits32
+|
+-mtu3_setbits
++setbits32
+)(base
+-     ,
++ +
+  offset, ...);


Would you like to try further software fine-tuning out?

Regards,
Markus

  reply	other threads:[~2018-09-09 11:13 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 19:41 [PATCH 0/5] introduce setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 functions Corentin Labbe
2018-09-07 19:41 ` Corentin Labbe
2018-09-07 19:41 ` Corentin Labbe
2018-09-07 19:41 ` [Cocci] " Corentin Labbe
2018-09-07 19:41 ` [PATCH 1/5] powerpc: rename setbits32/clrbits32 to setbits32_be/clrbits32_be Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` [Cocci] " Corentin Labbe
2018-09-10  5:16   ` Christophe LEROY
2018-09-10  5:16     ` Christophe LEROY
2018-09-10  5:16     ` Christophe LEROY
2018-09-10  5:16     ` [Cocci] " Christophe LEROY
2018-09-10 18:50     ` LABBE Corentin
2018-09-10 18:50       ` LABBE Corentin
2018-09-10 18:50       ` LABBE Corentin
2018-09-10 18:50       ` [Cocci] " LABBE Corentin
2018-09-07 19:41 ` [PATCH 2/5] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 in linux/setbits.h Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` [Cocci] " Corentin Labbe
2018-09-07 20:00   ` Scott Wood
2018-09-07 20:00     ` Scott Wood
2018-09-07 20:00     ` Scott Wood
2018-09-07 20:00     ` [Cocci] " Scott Wood
2018-09-07 20:00     ` Scott Wood
2018-09-10 18:49     ` LABBE Corentin
2018-09-10 18:49       ` LABBE Corentin
2018-09-10 18:49       ` LABBE Corentin
2018-09-10 18:49       ` [Cocci] " LABBE Corentin
2018-09-10  5:22   ` Christophe LEROY
2018-09-10  5:22     ` Christophe LEROY
2018-09-10  5:22     ` Christophe LEROY
2018-09-10  5:22     ` [Cocci] " Christophe LEROY
2018-09-10 18:53     ` LABBE Corentin
2018-09-10 18:53       ` LABBE Corentin
2018-09-10 18:53       ` LABBE Corentin
2018-09-10 18:53       ` [Cocci] " LABBE Corentin
2018-09-07 19:41 ` [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` [Cocci] " Corentin Labbe
2018-09-09 11:13   ` SF Markus Elfring [this message]
2018-09-09 11:13     ` SF Markus Elfring
2018-09-09 11:13     ` SF Markus Elfring
2018-09-09 11:13     ` SF Markus Elfring
2018-09-09 11:13     ` SF Markus Elfring
2018-09-09 11:13     ` SF Markus Elfring
2018-09-07 19:41 ` [PATCH 4/5] net: ethernet: stmmac: use xxxsetbits32 Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` [Cocci] " Corentin Labbe
2018-09-07 19:41 ` [PATCH 5/5] ata: ahci_sunxi: use xxxsetbits32 functions Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` Corentin Labbe
2018-09-07 19:41   ` [Cocci] " Corentin Labbe
2018-09-07 21:57 ` [PATCH 0/5] introduce setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 functions David Miller
2018-09-07 21:57   ` David Miller
2018-09-07 21:57   ` David Miller
2018-09-07 21:57   ` [Cocci] " David Miller
2018-09-10  5:24 ` Christophe LEROY
2018-09-10  5:24   ` Christophe LEROY
2018-09-10  5:24   ` Christophe LEROY
2018-09-10  5:24   ` [Cocci] " Christophe LEROY

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=463dbbdc-7afc-bee8-8da1-bbe70b4aec26@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=Gilles.Muller@lip6.fr \
    --cc=agust@denx.de \
    --cc=alexandre.torgue@st.com \
    --cc=alistair@popple.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=carlo@caione.org \
    --cc=clabbe@baylibre.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=davem@davemloft.net \
    --cc=galak@kernel.crashing.org \
    --cc=joabreu@synopsys.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.