[PATCH] ASoC: rsnd: make some arrays static const, makes object smaller

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Aug 2 01:11:22 CEST 2021


Hi Colin

Thank you for your patch

> Don't populate arrays on the stack but instead them static const.
> Makes the object code smaller by 242 bytes.
> 
> Before:
>    text    data     bss     dec     hex filename
>   23827    8764       0   32591    7f4f ./sound/soc/sh/rcar/ssi.o
> 
> After:
>    text    data     bss     dec     hex filename
>   23361    8988       0   32349    7e5d ./sound/soc/sh/rcar/ssi.o
> 
> gcc version 10.2.0)
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---

Nice to know.

	Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

Do you think we need similar patch to below ?
(In my quick check)

	core.c	rsnd_get_busif_shift()
		volume_ramp_rate[] // need static ?
	adg.c	rsnd_adg_clk_query()
		rsnd_adg_get_clkout()

Thank you for your help !!

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list