mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations
@ 2023-09-04 11:15 Andy Shevchenko
  2023-09-04 22:45 ` Kuninori Morimoto
  2023-09-11 23:57 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-09-04 11:15 UTC (permalink / raw)
  To: Mark Brown, Kuninori Morimoto, alsa-devel, linux-kernel
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Andy Shevchenko

Replace custom implementation of the macros from args.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/sound/soc.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index fa2337a3cf4c..509386ff5212 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -10,6 +10,7 @@
 #ifndef __LINUX_SND_SOC_H
 #define __LINUX_SND_SOC_H
 
+#include <linux/args.h>
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/types.h>
@@ -870,12 +871,8 @@ asoc_link_to_platform(struct snd_soc_dai_link *link, int n) {
 	.platforms	= platform,			\
 	.num_platforms	= ARRAY_SIZE(platform)
 
-#define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
 #define SND_SOC_DAILINK_REG(...) \
-	SND_SOC_DAILINK_REGx(__VA_ARGS__,		\
-			SND_SOC_DAILINK_REG3,	\
-			SND_SOC_DAILINK_REG2,	\
-			SND_SOC_DAILINK_REG1)(__VA_ARGS__)
+	CONCATENATE(SND_SOC_DAILINK_REG, COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__)
 
 #define SND_SOC_DAILINK_DEF(name, def...)		\
 	static struct snd_soc_dai_link_component name[]	= { def }
-- 
2.40.0.1.gaa8946217a0b


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

* Re: [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations
  2023-09-04 11:15 [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations Andy Shevchenko
@ 2023-09-04 22:45 ` Kuninori Morimoto
  2023-09-11 23:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2023-09-04 22:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mark Brown, alsa-devel, linux-kernel, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai


Hi

> Replace custom implementation of the macros from args.h.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(snip)
> -#define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
>  #define SND_SOC_DAILINK_REG(...) \
> -	SND_SOC_DAILINK_REGx(__VA_ARGS__,		\
> -			SND_SOC_DAILINK_REG3,	\
> -			SND_SOC_DAILINK_REG2,	\
> -			SND_SOC_DAILINK_REG1)(__VA_ARGS__)
> +	CONCATENATE(SND_SOC_DAILINK_REG, COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__)

Interesting nice macro !

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


Thank you for your help !!

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations
  2023-09-04 11:15 [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations Andy Shevchenko
  2023-09-04 22:45 ` Kuninori Morimoto
@ 2023-09-11 23:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-09-11 23:57 UTC (permalink / raw)
  To: Kuninori Morimoto, alsa-devel, linux-kernel, Andy Shevchenko
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai

On Mon, 04 Sep 2023 14:15:24 +0300, Andy Shevchenko wrote:
> Replace custom implementation of the macros from args.h.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations
      commit: 428cc4106a430781020eedc68e8d0511380eb0ef

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:[~2023-09-12  2:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-04 11:15 [PATCH v1 1/1] ASoC: soc.h: replace custom COUNT_ARGS() & CONCATENATE() implementations Andy Shevchenko
2023-09-04 22:45 ` Kuninori Morimoto
2023-09-11 23:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®