All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static
@ 2022-11-03 12:06 Colin Ian King
  2022-11-03 14:24 ` Pierre-Louis Bossart
  2022-11-03 16:34 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-11-03 12:06 UTC (permalink / raw)
  To: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood,
	Peter Ujfalusi, Bard Liao, Ranjani Sridharan, Kai Vehmanen,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Brent Lu, alsa-devel
  Cc: kernel-janitors, linux-kernel

Don't populate the read-only const array uid_strings on the stack but
instead make it static. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 sound/soc/intel/boards/sof_cirrus_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c
index 6e39eda77385..851c516c8f5b 100644
--- a/sound/soc/intel/boards/sof_cirrus_common.c
+++ b/sound/soc/intel/boards/sof_cirrus_common.c
@@ -155,7 +155,7 @@ static const char * const cs35l41_name_prefixes[] = { "WL", "WR", "TL", "TR" };
  */
 static int cs35l41_compute_codec_conf(void)
 {
-	const char * const uid_strings[] = { "0", "1", "2", "3" };
+	static const char * const uid_strings[] = { "0", "1", "2", "3" };
 	unsigned int uid, sz = 0;
 	struct acpi_device *adev;
 	struct device *physdev;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static
  2022-11-03 12:06 [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static Colin Ian King
@ 2022-11-03 14:24 ` Pierre-Louis Bossart
  2022-11-03 16:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2022-11-03 14:24 UTC (permalink / raw)
  To: Colin Ian King, Cezary Rojewski, Liam Girdwood, Peter Ujfalusi,
	Bard Liao, Ranjani Sridharan, Kai Vehmanen, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Brent Lu, alsa-devel
  Cc: kernel-janitors, linux-kernel

On 11/3/22 8:06 AM, Colin Ian King wrote:
> Don't populate the read-only const array uid_strings on the stack but
> instead make it static. Also makes the object code a little smaller.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>   sound/soc/intel/boards/sof_cirrus_common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c
> index 6e39eda77385..851c516c8f5b 100644
> --- a/sound/soc/intel/boards/sof_cirrus_common.c
> +++ b/sound/soc/intel/boards/sof_cirrus_common.c
> @@ -155,7 +155,7 @@ static const char * const cs35l41_name_prefixes[] = { "WL", "WR", "TL", "TR" };
>    */
>   static int cs35l41_compute_codec_conf(void)
>   {
> -	const char * const uid_strings[] = { "0", "1", "2", "3" };
> +	static const char * const uid_strings[] = { "0", "1", "2", "3" };
>   	unsigned int uid, sz = 0;
>   	struct acpi_device *adev;
>   	struct device *physdev;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static
  2022-11-03 12:06 [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static Colin Ian King
  2022-11-03 14:24 ` Pierre-Louis Bossart
@ 2022-11-03 16:34 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: Liam Girdwood, Colin Ian King, Jaroslav Kysela, Brent Lu,
	Cezary Rojewski, Ranjani Sridharan, Pierre-Louis Bossart,
	Bard Liao, alsa-devel, Kai Vehmanen, Takashi Iwai,
	Peter Ujfalusi
  Cc: kernel-janitors, linux-kernel

On Thu, 3 Nov 2022 12:06:24 +0000, Colin Ian King wrote:
> Don't populate the read-only const array uid_strings on the stack but
> instead make it static. Also makes the object code a little smaller.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: Intel: cirrus-common: Make const array uid_strings static
      commit: b43d0c0a42b2c44da824b3de0364d73be722a8c7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-03 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 12:06 [PATCH] ASoC: Intel: cirrus-common: Make const array uid_strings static Colin Ian King
2022-11-03 14:24 ` Pierre-Louis Bossart
2022-11-03 16:34 ` Mark Brown

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.