All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
	Russell King <linux@arm.linux.org.uk>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.de>,
	linux-arm-kernel@lists.infradead.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
Date: Sun, 11 Aug 2013 18:51:42 +0200	[thread overview]
Message-ID: <1376239917-15594-2-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the
arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not compiled.

 sound/soc/pxa/mioa701_wm9713.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 97b711e..20fdce6 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -133,10 +133,11 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
 	unsigned short reg;
 
 	/* Add mioa701 specific widgets */
-	snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
+	snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets,
+				  ARRAY_SIZE(mioa701_dapm_widgets));
 
 	/* Set up mioa701 specific audio path audio_mapnects */
-	snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
+	snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
 	/* Prepare GPIO8 for rear speaker amplifier */
 	reg = codec->driver->read(codec, AC97_GPIO_CFG);


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Russell King <linux@arm.linux.org.uk>,
	Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
Date: Sun, 11 Aug 2013 16:51:42 +0000	[thread overview]
Message-ID: <1376239917-15594-2-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the
arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not compiled.

 sound/soc/pxa/mioa701_wm9713.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 97b711e..20fdce6 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -133,10 +133,11 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
 	unsigned short reg;
 
 	/* Add mioa701 specific widgets */
-	snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
+	snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets,
+				  ARRAY_SIZE(mioa701_dapm_widgets));
 
 	/* Set up mioa701 specific audio path audio_mapnects */
-	snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
+	snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
 	/* Prepare GPIO8 for rear speaker amplifier */
 	reg = codec->driver->read(codec, AC97_GPIO_CFG);


WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <Julia.Lawall@lip6.fr>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Russell King <linux@arm.linux.org.uk>,
	Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
Date: Sun, 11 Aug 2013 18:51:42 +0200	[thread overview]
Message-ID: <1376239917-15594-2-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the
arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not compiled.

 sound/soc/pxa/mioa701_wm9713.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 97b711e..20fdce6 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -133,10 +133,11 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
 	unsigned short reg;
 
 	/* Add mioa701 specific widgets */
-	snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
+	snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets,
+				  ARRAY_SIZE(mioa701_dapm_widgets));
 
 	/* Set up mioa701 specific audio path audio_mapnects */
-	snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
+	snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
 	/* Prepare GPIO8 for rear speaker amplifier */
 	reg = codec->driver->read(codec, AC97_GPIO_CFG);

WARNING: multiple messages have this Message-ID (diff)
From: Julia.Lawall@lip6.fr (Julia Lawall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
Date: Sun, 11 Aug 2013 18:51:42 +0200	[thread overview]
Message-ID: <1376239917-15594-2-git-send-email-Julia.Lawall@lip6.fr> (raw)
In-Reply-To: <1376239917-15594-1-git-send-email-Julia.Lawall@lip6.fr>

From: Julia Lawall <Julia.Lawall@lip6.fr>

Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the
arity of the called function.

The semantic match that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,f;
@@

f(...,
- ARRAY_AND_SIZE(e)
+ e,ARRAY_SIZE(e)
  ,...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
Not compiled.

 sound/soc/pxa/mioa701_wm9713.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 97b711e..20fdce6 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -133,10 +133,11 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
 	unsigned short reg;
 
 	/* Add mioa701 specific widgets */
-	snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
+	snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets,
+				  ARRAY_SIZE(mioa701_dapm_widgets));
 
 	/* Set up mioa701 specific audio path audio_mapnects */
-	snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
+	snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
 	/* Prepare GPIO8 for rear speaker amplifier */
 	reg = codec->driver->read(codec, AC97_GPIO_CFG);

  reply	other threads:[~2013-08-11 16:56 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 16:51 [PATCH 0/16] Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-11 16:51 ` Julia Lawall
2013-08-11 16:51 ` Julia Lawall [this message]
2013-08-11 16:51   ` [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 18:06   ` Mark Brown
2013-08-11 18:06     ` Mark Brown
2013-08-11 18:06     ` [PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argumen Mark Brown
2013-08-11 16:51 ` [PATCH 2/16] arch/arm/mach-pxa: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-20  9:13   ` Linus Walleij
2013-08-20  9:13     ` Linus Walleij
2013-08-20  9:13     ` [PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argum Linus Walleij
2013-08-11 16:51 ` [PATCH 4/16] arch/arm/mach-pxa/z2.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 5/16] arch/arm/mach-pxa/vpac270.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 6/16] arch/arm/mach-pxa: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 7/16] arch/arm/mach-pxa/colibri-pxa270-income.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` [PATCH 7/16] arch/arm/mach-pxa/colibri-pxa270-income.c: Avoid using ARRAY_AND_SIZE(e) as a function Julia Lawall
2013-08-11 16:51 ` [PATCH 8/16] arch/arm/mach-pxa/palmz72.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 9/16] arch/arm/mach-pxa/mioa701.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-12 19:58   ` Robert Jarzmik
2013-08-12 19:58     ` Robert Jarzmik
2013-08-12 19:58     ` Robert Jarzmik
2013-08-12 20:24     ` Julia Lawall
2013-08-12 20:24       ` Julia Lawall
2013-08-12 20:24       ` Julia Lawall
2013-08-11 16:51 ` [PATCH 10/16] arch/arm/mach-mmp: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 11/16] arch/arm/mach-pxa/palmtreo.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-13  0:34   ` Tomas Cech
2013-08-13  0:34     ` Tomas Cech
2013-08-13  0:34     ` Tomas Cech
2013-08-11 16:51 ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-12  5:26   ` Viresh Kumar
2013-08-12  5:38     ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Viresh Kumar
2013-08-12  5:45     ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-12  5:45       ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Julia Lawall
2013-08-12  5:46       ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Viresh Kumar
2013-08-12  5:58         ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Viresh Kumar
2013-08-12  5:48         ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-12  5:48           ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Julia Lawall
2013-08-12  5:50           ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Viresh Kumar
2013-08-12  5:50             ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Viresh Kumar
2013-08-13 13:22   ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Rafael J. Wysocki
2013-08-13 13:22     ` [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argu Rafael J. Wysocki
2013-08-11 16:51 ` [PATCH 13/16] arch/arm/mach-pxa/hx4700.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 14/16] arch/arm/mach-pxa/ezx.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51 ` [PATCH 15/16] arch/arm/mach-kirkwood: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-12 19:14   ` Jason Cooper
2013-08-12 19:14     ` Jason Cooper
2013-08-12 19:14     ` Jason Cooper
2013-08-11 16:51 ` [PATCH 16/16] arch/arm/mach-pxa/stargate2.c: " Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-11 16:51   ` Julia Lawall
2013-08-12  8:22   ` [PATCH 16/16] arch/arm/mach-pxa/stargate2.c: Avoid using ARRAY_AND_SIZE(e) as a function argumen Jonathan Cameron
2013-08-12  9:22     ` [PATCH 16/16] arch/arm/mach-pxa/stargate2.c: Avoid using ARRAY_AND_SIZE(e) as a function argument Jonathan Cameron
2013-08-12  9:22     ` Jonathan Cameron

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=1376239917-15594-2-git-send-email-Julia.Lawall@lip6.fr \
    --to=julia.lawall@lip6.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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.