From: Vinod Koul <vinod.koul@intel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: intel: mfld: Make static string arrays 'const 'char * const []'
Date: Wed, 16 Nov 2016 08:21:59 +0530 [thread overview]
Message-ID: <20161116025159.GP3000@localhost> (raw)
In-Reply-To: <1479242445-12069-1-git-send-email-lars@metafoo.de>
On Tue, Nov 15, 2016 at 09:40:45PM +0100, Lars-Peter Clausen wrote:
> const char * const [] is the preferred type for static string arrays since
> this states explicitly that the individual entries are not going to be
> changed. Due to limitations in the ASoC API it was not possible to use it
> for enum text arrays. Commit 87023ff74b23 ("ASoC: Declare const properly
> for enum texts") changed this, but most drivers still use 'const char
> * []' as the type for their enum text arrays.
>
> Change these occurrences of 'static * const char * []' to 'static const
> char * const []'.
>
> The conversion was done automatically using the following coccinelle
> semantic patch:
> // <smpl>
> @disable optional_qualifier@
> identifier s;
> @@
> static
> -const char *
> +const char * const
> s[] = ...;
> // </smpl>
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
--
~Vinod
next prev parent reply other threads:[~2016-11-16 2:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 20:40 [PATCH] ASoC: intel: mfld: Make static string arrays 'const 'char * const []' Lars-Peter Clausen
2016-11-16 2:51 ` Vinod Koul [this message]
2016-11-18 12:01 ` Applied "ASoC: intel: mfld: Make static string arrays 'const 'char * const []'" to the asoc tree Mark Brown
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=20161116025159.GP3000@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--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;
as well as URLs for NNTP newsgroup(s).