Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 004/102] ASoC: Add const to SOC_ENUM_*_DECL() macros
Date: Tue, 18 Feb 2014 12:32:16 +0100	[thread overview]
Message-ID: <1392723148-12597-2-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1392723148-12597-1-git-send-email-tiwai@suse.de>

Since these macros are supposed to be used for decalring const
objects, let's add the const modifier there.

The doubled const appearing in usages will be cleaned by later
patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/soc.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index a53edc25334d..cc891387e7ac 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -286,14 +286,14 @@
  * ARRAY_SIZE internally
  */
 #define SOC_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xtexts) \
-	struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
+	const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
 						ARRAY_SIZE(xtexts), xtexts)
 #define SOC_ENUM_SINGLE_DECL(name, xreg, xshift, xtexts) \
 	SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
 #define SOC_ENUM_SINGLE_EXT_DECL(name, xtexts) \
-	struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
+	const struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
 #define SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xmask, xtexts, xvalues) \
-	struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
+	const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
 							ARRAY_SIZE(xtexts), xtexts, xvalues)
 #define SOC_VALUE_ENUM_SINGLE_DECL(name, xreg, xshift, xmask, xtexts, xvalues) \
 	SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
-- 
1.8.5.2

  reply	other threads:[~2014-02-18 11:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:32 [PATCH 000/102 - chunk#2] Add const to SOC_ENUM_*_DECL() macros Takashi Iwai
2014-02-18 11:32 ` Takashi Iwai [this message]
2014-02-20  1:55   ` [PATCH 004/102] ASoC: " Mark Brown
2014-02-18 11:32 ` [PATCH 005/102] ASoC: adau1373: Remove superfluous const Takashi Iwai
2014-02-20  1:55   ` Mark Brown
2014-02-18 11:32 ` [PATCH 006/102] ASoC: lm49453: " Takashi Iwai
2014-02-20  1:56   ` Mark Brown
2014-02-18 11:32 ` [PATCH 007/102] ASoC: mc13783: " Takashi Iwai
2014-02-20  1:56   ` Mark Brown
2014-02-18 11:32 ` [PATCH 008/102] ASoC: rt5631: " Takashi Iwai
2014-02-20  1:56   ` Mark Brown
2014-02-18 11:32 ` [PATCH 009/102] ASoC: rt5640: " Takashi Iwai
2014-02-18 12:56   ` Liam Girdwood
2014-02-18 13:20     ` [PATCH 009/102] ASoC: rt5640: Removesuperfluousconst Bard Liao
2014-02-20  1:56   ` [PATCH 009/102] ASoC: rt5640: Remove superfluous const Mark Brown
2014-02-18 11:32 ` [PATCH 010/102] ASoC: ssm2518: " Takashi Iwai
2014-02-20  1:57   ` Mark Brown
2014-02-18 11:32 ` [PATCH 011/102] ASoC: sta529: " Takashi Iwai
2014-02-20  1:57   ` Mark Brown
2014-02-18 11:32 ` [PATCH 012/102] ASoC: wm8804: " Takashi Iwai
2014-02-20  1:57   ` Mark Brown
2014-02-18 11:32 ` [PATCH 013/102] ASoC: wm8978: " Takashi Iwai
2014-02-20  1:57   ` Mark Brown
2014-02-18 11:32 ` [PATCH 014/102] ASoC: wm8983: " Takashi Iwai
2014-02-20  1:57   ` Mark Brown
2014-02-18 11:32 ` [PATCH 015/102] ASoC: wm8985: " Takashi Iwai
2014-02-20  1:58   ` Mark Brown
2014-02-18 11:32 ` [PATCH 016/102] ASoC: wm8995: " Takashi Iwai
2014-02-20  1:58   ` Mark Brown
2014-02-18 16:49 ` [PATCH 000/102 - chunk#2] Add const to SOC_ENUM_*_DECL() macros Brian Austin
2014-02-20  1:53 ` Mark Brown
2014-02-20  7:00   ` Takashi Iwai

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=1392723148-12597-2-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.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