mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Mark Brown <broonie@kernel.org>, <linux-sound@vger.kernel.org>,
	<tiwai@suse.com>, <perex@perex.cz>, <amade@asmblr.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/7] ASoC: core: Create new components in sane state
Date: Wed, 14 Oct 2026 10:06:34 +0200	[thread overview]
Message-ID: <eb66c781-0c7f-4e37-bde7-658355f87428@intel.com> (raw)
In-Reply-To: <875wz5yo67.wl-kuninori.morimoto.gx@renesas.com>

On 10/14/2026 5:08 AM, Kuninori Morimoto wrote:

>> At the same time, I'm here to help with any conflicts should any arise.
> 
> It seems there was no big issue/conflicts, Thank you for your help.
> But 1 concern from my side is that the function naming
> 
> We would like to keep snd_soc_component_xxx() naming.
> New ASoC has similar functions, it is very confusable.
> 
> 	snd_soc_component_register()
> 	snd_soc_register_component()
> 
> Both are for register function, and the diff is used parameter.
> So we would like to merge them by using _Generic()
> This part had conflict with my (not yet posted) patches.
> 
> I will post merge patch (by _Generic()) later.
I disagree about the naming part.  IMHO there should be a clear division
between object-level and general-level functions.

In essence if something is found within object-level scope, it should be
prefixed with the object' class name and have the object-ptr as a first
argument e.g.:

1) snd_soc_component_register(struct snd_soc_component *component)

whereas for general-level functions where the framework does everything
for the caller the arguments differ and so should the name:

2) snd_soc_register_component(<component does not start the list>)

If 2) is named in the same fashion as 1) then a user, especially ASoC
newcomer assumes component-ptr always starts the list and gets surprised
later.  Again, in my opinion we should not mangle all the names together
like if their arguments do not matter.  Happy to hear more people voice
their opinion about the subject.


Kind regards,
Czarek

      reply	other threads:[~2026-10-14  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 13:33 Cezary Rojewski
2026-10-07 13:33 ` [PATCH 1/7] ASoC: core: Add component constructor Cezary Rojewski
2026-10-07 13:33 ` [PATCH 2/7] ASoC: core: Rename and export soc_component_add() Cezary Rojewski
2026-10-07 13:33 ` [PATCH 3/7] ASoC: dmaengine: Switch to snd_snd_component_new() Cezary Rojewski
2026-10-07 13:33 ` [PATCH 4/7] ASoC: topology-test: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 5/7] ASoC: Intel: catpt: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 6/7] ASoC: Intel: avs: " Cezary Rojewski
2026-10-07 13:33 ` [PATCH 7/7] ASoC: core: Remove unused component-register members Cezary Rojewski
2026-10-12 22:58 ` [PATCH 0/7] ASoC: core: Create new components in sane state Mark Brown
2026-10-12 23:52 ` Kuninori Morimoto
2026-10-13 10:53   ` Mark Brown
2026-10-13 11:24     ` Cezary Rojewski
2026-10-13 12:44       ` Mark Brown
2026-10-14  3:08       ` Kuninori Morimoto
2026-10-14  8:06         ` Cezary Rojewski [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=eb66c781-0c7f-4e37-bde7-658355f87428@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amade@asmblr.net \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --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 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®