Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: "Rojewski, Cezary" <cezary.rojewski@intel.com>
Cc: <linux-sound@vger.kernel.org>, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 1/2] ASoC: soc-core: add soc_rebind_card()
Date: Wed, 13 May 2026 23:36:05 +0000	[thread overview]
Message-ID: <877bp69923.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <959b6684-8d56-46f0-b614-f6457af09cdb@intel.com>


Hi Rojewski

Thank you for your review

> > +	soc_rebind_card();
> 
> The naming is off.  Clearly, we're not dealing with a card - many cards 
> could be bound here.
>
> As previous patches related to the subject removed the rebind_card() 
> function, I'm not sure we want it back.  Perhaps a readable macro instead?
> 
> #define for_each_unbound_card(card, c)
> 	list_for_each_entry_safe(card, c, &unbind_card_list, list)

Biggest concern here is that snd_soc_add_component() will goes to
soc-component.c, and it can't use "unbind_card_list" which will goto
soc-card.c as local variable (because of capsuling).

So, using #define is not enough. We would like to makes it as
"card function", and call it from soc-component.c.

How about "soc_try_bind_card_all()" or something ?

Note is that I would like to rename card function as "[snd_]soc_card_xxx()"
when it goes to soc-card.c
ex)
	soc_bind_card()		-> soc_card_bind()
	soc_unbind_card()	-> soc_card_unbind()
	soc_try_bind_card_all()	-> soc_card_try_bind_all()

Thank you for your help !!

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2026-05-13 23:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  1:48 [PATCH 0/2] ASoC: tidyup card rebind functions Kuninori Morimoto
2026-05-13  1:48 ` [PATCH 1/2] ASoC: soc-core: add soc_rebind_card() Kuninori Morimoto
2026-05-13 21:01   ` Rojewski, Cezary
2026-05-13 23:36     ` Kuninori Morimoto [this message]
2026-05-13  1:48 ` [PATCH 2/2] ASoC: soc-core: handle card->list in snd_soc_unbind_card() Kuninori Morimoto
2026-05-13 20:46   ` Rojewski, Cezary
2026-05-14  0:04     ` Kuninori Morimoto

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=877bp69923.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=linux-sound@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox