All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
	<linux-renesas-soc@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [alsa-devel] [PATCH 1/xx][sample] ASoC: add COMPONENT_FUNC() macro for snd_soc_component_driver
Date: Thu, 4 Aug 2016 00:39:54 +0000	[thread overview]
Message-ID: <87shulml13.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <7de0934c-6d6a-ad51-7d5a-693bcf999a56@metafoo.de>


Hi Lars

Thank you for your feedback

> > snd_soc_component_driver requests some struct xxx, and int num_xxx.
> > To make initialize easy, this patch adds COMPONENT_FUNC() macro.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  include/sound/soc.h | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/include/sound/soc.h b/include/sound/soc.h
> > index 6144882..41c21f9 100644
> > --- a/include/sound/soc.h
> > +++ b/include/sound/soc.h
> > @@ -795,6 +795,9 @@ struct snd_soc_component_driver {
> >  	int probe_order;
> >  	int remove_order;
> >  };
> > +#define COMPONENT_FUNC(name, func)		\
> > +	.name		= func,			\
> > +	.num_##name	= ARRAY_SIZE(func)
> 
> I'd avoid like to a void this kind of macro. Sure it slightly reduces
> boilerplate code, but it is difficult to parse for both humans as well as
> machines. Makes the code much less intuitive to understand and also breaks
> automated scripts.

Thanks, and yes agree.
Now, I'm creating many patches without above macro.

WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
	linux-renesas-soc@vger.kernel.org,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [alsa-devel] [PATCH 1/xx][sample] ASoC: add COMPONENT_FUNC() macro for snd_soc_component_driver
Date: Thu, 4 Aug 2016 00:39:54 +0000	[thread overview]
Message-ID: <87shulml13.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <7de0934c-6d6a-ad51-7d5a-693bcf999a56@metafoo.de>


Hi Lars

Thank you for your feedback

> > snd_soc_component_driver requests some struct xxx, and int num_xxx.
> > To make initialize easy, this patch adds COMPONENT_FUNC() macro.
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  include/sound/soc.h | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/include/sound/soc.h b/include/sound/soc.h
> > index 6144882..41c21f9 100644
> > --- a/include/sound/soc.h
> > +++ b/include/sound/soc.h
> > @@ -795,6 +795,9 @@ struct snd_soc_component_driver {
> >  	int probe_order;
> >  	int remove_order;
> >  };
> > +#define COMPONENT_FUNC(name, func)		\
> > +	.name		= func,			\
> > +	.num_##name	= ARRAY_SIZE(func)
> 
> I'd avoid like to a void this kind of macro. Sure it slightly reduces
> boilerplate code, but it is difficult to parse for both humans as well as
> machines. Makes the code much less intuitive to understand and also breaks
> automated scripts.

Thanks, and yes agree.
Now, I'm creating many patches without above macro.

  reply	other threads:[~2016-08-04  0:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  1:12 How to post cleanup patches ? Kuninori Morimoto
2016-08-03  1:12 ` Kuninori Morimoto
2016-08-03  1:13 ` [PATCH 1/xx][sample] ASoC: add COMPONENT_FUNC() macro for snd_soc_component_driver Kuninori Morimoto
2016-08-03  1:13   ` Kuninori Morimoto
2016-08-03 19:16   ` [alsa-devel] " Lars-Peter Clausen
2016-08-04  0:39     ` Kuninori Morimoto [this message]
2016-08-04  0:39       ` Kuninori Morimoto
2016-08-03  1:13 ` [PATCH 2/xx][sample] ASoC: codec duplicated callback function goes to component on wm8978 Kuninori Morimoto
2016-08-03  1:13   ` Kuninori Morimoto
2016-08-03  5:16   ` [alsa-devel] " kbuild test robot
2016-08-03  1:14 ` [PATCH 3/xx][sample] ASoC: remove codec duplicated callback function Kuninori Morimoto
2016-08-03  1:14   ` Kuninori Morimoto
2016-08-03  5:48   ` [alsa-devel] " kbuild test robot
2016-08-08 11:06   ` Applied "ASoC: remove codec duplicated callback function" to the asoc tree Mark Brown
2016-08-08 11:06     ` Mark Brown
2016-08-03 10:56 ` How to post cleanup patches ? Mark Brown
2016-08-04  0:22   ` Kuninori Morimoto
2016-08-04  0:22     ` Kuninori Morimoto
2016-08-03 19:20 ` [alsa-devel] " Lars-Peter Clausen

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=87shulml13.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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.