From: Robert Jarzmik <robert.jarzmik@free.fr>
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: pxa: Make static string arrays 'const 'char * const []'
Date: Sun, 13 Nov 2016 11:12:14 +0100 [thread overview]
Message-ID: <87y40nu1s1.fsf@belgarion.home> (raw)
In-Reply-To: <1478956993-10065-1-git-send-email-lars@metafoo.de> (Lars-Peter Clausen's message of "Sat, 12 Nov 2016 14:23:13 +0100")
Lars-Peter Clausen <lars@metafoo.de> writes:
> 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 87023ff74 ('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>
Hi,
Could you amend your commit message so that checkpatch doesn't complain anymore
? This being done, looks good to me.
Cheers.
--
Robert
next prev parent reply other threads:[~2016-11-13 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-12 13:23 [PATCH] ASoC: pxa: Make static string arrays 'const 'char * const []' Lars-Peter Clausen
2016-11-13 10:12 ` Robert Jarzmik [this message]
2016-11-13 11:40 ` Applied "ASoC: pxa: 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=87y40nu1s1.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--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).