From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760112AbdKPQ0M (ORCPT ); Thu, 16 Nov 2017 11:26:12 -0500 Received: from smtprelay0118.hostedemail.com ([216.40.44.118]:33979 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760077AbdKPQZ7 (ORCPT ); Thu, 16 Nov 2017 11:25:59 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1542:1711:1730:1747:1777:1792:2393:2553:2559:2562:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:3870:4250:4321:5007:6119:6261:8603:10004:10848:11026:11658:11914:12048:12296:12438:12555:12895:12986:13972:14181:14394:14721:21080:21433:21450:21627:30054:30090,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: watch33_50e4981424416 X-Filterd-Recvd-Size: 3296 From: Joe Perches To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Date: Thu, 16 Nov 2017 08:25:47 -0800 Message-Id: X-Mailer: git-send-email 2.15.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 -- 2.15.0