From patchwork Thu Nov 16 16:25:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 10061459 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 88EC7601AE for ; Thu, 16 Nov 2017 16:26:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C2632ABAB for ; Thu, 16 Nov 2017 16:26:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 713782ABAE; Thu, 16 Nov 2017 16:26:28 +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=unavailable 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 ED4F82ABAB for ; Thu, 16 Nov 2017 16:26:26 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8651926772F; Thu, 16 Nov 2017 17:26:02 +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 CF77826772C; Thu, 16 Nov 2017 17:26:01 +0100 (CET) Received: from smtprelay.hostedemail.com (smtprelay0078.hostedemail.com [216.40.44.78]) by alsa0.perex.cz (Postfix) with ESMTP id 9173D26772B for ; Thu, 16 Nov 2017 17:25:59 +0100 (CET) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 4E97B180A68AA; Thu, 16 Nov 2017 16:25:58 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: watch33_50e4981424416 X-Filterd-Recvd-Size: 3296 Received: from joe-laptop.perches.com (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA; Thu, 16 Nov 2017 16:25:55 +0000 (UTC) From: Joe Perches To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam Date: Thu, 16 Nov 2017 08:25:47 -0800 Message-Id: X-Mailer: git-send-email 2.15.0 In-Reply-To: References: Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown , linuxppc-dev@lists.ozlabs.org Subject: [alsa-devel] [PATCH 2/2] ASoC: fsl_asrc: constify some arrays 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 Using const reduces data. $ size sound/soc/fsl/fsl_asrc.o* text data bss dec hex filename 21691 5872 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.new 21435 6128 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.old Signed-off-by: Joe Perches Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index ed683fe8b94a..641724c9b3f8 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -49,12 +49,12 @@ static const u8 process_option[][12][2] = { }; /* Corresponding to process_option */ -static int supported_input_rate[] = { +static const int supported_input_rate[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, }; -static int supported_asrc_rate[] = { +static const int supported_asrc_rate[] = { 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, }; @@ -62,26 +62,26 @@ static int supported_asrc_rate[] = { * The following tables map the relationship between asrc_inclk/asrc_outclk in * fsl_asrc.h and the registers of ASRCSR */ -static unsigned char input_clk_map_imx35[] = { +static const unsigned char input_clk_map_imx35[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; -static unsigned char output_clk_map_imx35[] = { +static const unsigned char output_clk_map_imx35[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; /* i.MX53 uses the same map for input and output */ -static unsigned char input_clk_map_imx53[] = { +static const unsigned char input_clk_map_imx53[] = { /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ 0x0, 0x1, 0x2, 0x7, 0x4, 0x5, 0x6, 0x3, 0x8, 0x9, 0xa, 0xb, 0xc, 0xf, 0xe, 0xd, }; -static unsigned char output_clk_map_imx53[] = { +static const unsigned char output_clk_map_imx53[] = { /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ 0x8, 0x9, 0xa, 0x7, 0xc, 0x5, 0x6, 0xb, 0x0, 0x1, 0x2, 0x3, 0x4, 0xf, 0xe, 0xd, }; -static unsigned char *clk_map[2]; +static const unsigned char *clk_map[2]; /** * Request ASRC pair