From patchwork Tue Nov 15 20:40:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 9430787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 037146047D for ; Wed, 16 Nov 2016 02:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF47528D4D for ; Wed, 16 Nov 2016 02:05:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3D4728D50; Wed, 16 Nov 2016 02:05:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2335A28D4D for ; Wed, 16 Nov 2016 02:05:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8942B26737B; Wed, 16 Nov 2016 03:05:43 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E5FAA2669BF; Wed, 16 Nov 2016 03:03:24 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 59B2D266998; Tue, 15 Nov 2016 21:40:58 +0100 (CET) Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by alsa0.perex.cz (Postfix) with ESMTP id 41E4D26723F for ; Tue, 15 Nov 2016 21:40:51 +0100 (CET) Received: from [78.47.166.52] (helo=sslproxy04.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1c6kXC-0003eG-BI; Tue, 15 Nov 2016 21:40:50 +0100 Received: from [46.244.226.139] (helo=lars-laptop.fritz.box) by sslproxy04.your-server.de with esmtpsa (TLSv1.2:AES256-SHA:256) (Exim 4.84_2) (envelope-from ) id 1c6kXC-0005j9-3E; Tue, 15 Nov 2016 21:40:50 +0100 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Tue, 15 Nov 2016 21:40:45 +0100 Message-Id: <1479242445-12069-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.99.2/22542/Tue Nov 15 20:16:47 2016) Cc: Vinod Koul , alsa-devel@alsa-project.org, Lars-Peter Clausen Subject: [alsa-devel] [PATCH] ASoC: intel: mfld: Make static string arrays 'const 'char * const []' X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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: // @disable optional_qualifier@ identifier s; @@ static -const char * +const char * const s[] = ...; // Signed-off-by: Lars-Peter Clausen Acked-by: Vinod Koul --- sound/soc/intel/boards/mfld_machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 34f46c7..4e08885 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c @@ -81,9 +81,9 @@ static struct snd_soc_jack_zone mfld_zones[] = { }; /* sound card controls */ -static const char *headset_switch_text[] = {"Earpiece", "Headset"}; +static const char * const headset_switch_text[] = {"Earpiece", "Headset"}; -static const char *lo_text[] = {"Vibra", "Headset", "IHF", "None"}; +static const char * const lo_text[] = {"Vibra", "Headset", "IHF", "None"}; static const struct soc_enum headset_enum = SOC_ENUM_SINGLE_EXT(2, headset_switch_text);