Re: [PATCH 0/7] ASoC: core: Create new components in sane state

From: Cezary Rojewski

Date: Wed Oct 14 2026 - 04:09:48 EST


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