Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@sirena.org.uk>
To: Joonyoung Shim <dofmind@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: Fix long name of control for	dapm_switch
Date: Thu, 5 Mar 2009 17:26:26 +0000	[thread overview]
Message-ID: <20090305172624.GH2416@sirena.org.uk> (raw)
In-Reply-To: <4e1455be0903031747s65097766saea220037d1335ff@mail.gmail.com>

On Wed, Mar 04, 2009 at 10:47:09AM +0900, Joonyoung Shim wrote:
> The length of long control name doesn't include the length of widget
> name at present when widget->id is snd_soc_dapm_switch, so the long
> control name of dapm_switch is shortened.
> To avoid this problem, the long control name only for dapm_mixer_named_ctl
> must have simply the kcontrol name.

This is a good catch - thanks!

Unfortunately your patch doesn't apply against the current topic/asoc
branch of Takashi's repository, I've implemented a slightly different
version of it.

> -                       name_len = strlen(w->kcontrols[i].name) + 1;
> -                       if (w->id == snd_soc_dapm_mixer)
> -                               name_len += 1 + strlen(w->name);
> +                       if (w->id == snd_soc_dapm_mixer_named_ctl)
> +                               name_len = strlen(w->kcontrols[i].name) + 1;
> +                       else
> +                               name_len = 2 + strlen(w->name)
> +                                       + strlen(w->kcontrols[i].name);

Here I just changed the test to != named_ctl.

> 
> -                       switch (w->id) {
> -                       case snd_soc_dapm_mixer:
> -                       default:

Your chanegs here appear to only flip to an if/else from a switch
statement?  Please mention things like this in your commit logs (or
split them into separate patches) - it makes your changes easier to
review.

  reply	other threads:[~2009-03-05 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04  1:47 [PATCH] ASoC: Fix long name of control for dapm_switch Joonyoung Shim
2009-03-05 17:26 ` Mark Brown [this message]
2009-03-06  0:02   ` Joonyoung Shim
2009-03-06  0:28     ` Joonyoung Shim

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=20090305172624.GH2416@sirena.org.uk \
    --to=broonie@sirena.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=dofmind@gmail.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