All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Timur Tabi <timur@tabi.org>, Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ASoC: fsl_asrc: constify some arrays
Date: Thu, 16 Nov 2017 20:09:57 -0800	[thread overview]
Message-ID: <20171117040956.GA3153@Asurada-CZ80> (raw)
In-Reply-To: <b8a2684d6615ab36fa28f67606e5560c8097c8ef.1510849466.git.joe@perches.com>

On Thu, Nov 16, 2017 at 08:25:47AM -0800, Joe Perches wrote:
> 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 <joe@perches.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> ---
>  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
> 

      reply	other threads:[~2017-11-17  4:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 16:25 [PATCH 0/2] ASoC: fsl_asrc: neatening Joe Perches
2017-11-16 16:25 ` Joe Perches
2017-11-16 16:25 ` [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format Joe Perches
2017-11-16 16:25   ` Joe Perches
2017-11-16 19:01   ` Nicolin Chen
2017-11-16 19:01     ` Nicolin Chen
2017-11-16 16:25 ` [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Joe Perches
2017-11-17  4:09   ` Nicolin Chen [this message]

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=20171117040956.GA3153@Asurada-CZ80 \
    --to=nicoleotsuka@gmail.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=joe@perches.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=perex@perex.cz \
    --cc=timur@tabi.org \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.