mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v1 1/1] ALSA: control: Use list_for_each_entry_safe()
Date: Tue, 29 Aug 2023 17:20:33 +0300	[thread overview]
Message-ID: <ZO3+sVKQrQT+Sefj@smile.fi.intel.com> (raw)
In-Reply-To: <9b71579b-3c2c-aafc-64d0-ae16603de82b@perex.cz>

On Tue, Aug 29, 2023 at 04:10:24PM +0200, Jaroslav Kysela wrote:
> On 29. 08. 23 15:52, Andy Shevchenko wrote:

...

> > Takashi, if you have anybody or want yourself to spend some time,
> > I believe you can simplify a lot the parser in this file with
> > the help of lib/cmdline.c APIs.
> 
> You probably mean next_arg() function. Unfortunately, it does not handle all
> cases we need to parse. The control IDs are a bit different than standard
> arguments.

Not only that, but also get_option() / get_options().
It might still make sense to look into and expand next_arg() to do
what you want (like I have done to get_option() which later allows
to have parse_int_array_user() be implemented).

It also have test cases, which can be expanded / amended as well.

...

> > -	list_for_each_entry(lctl, &led->controls, list)
> > +	list_for_each_entry(lctl, _lctl, &led->controls, list)
> 
> The list_for_each_entry_safe() should be used here, too.

Oh, good catch!

> With the fix:
> 
> Reviewed-by: Jaroslav Kysela <perex@perex.cz>

Thank you, I'll send a v2 soon.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-08-29 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 13:52 Andy Shevchenko
2023-08-29 14:02 ` Takashi Iwai
2023-08-29 14:16   ` Andy Shevchenko
2023-08-29 14:10 ` Jaroslav Kysela
2023-08-29 14:20   ` Andy Shevchenko [this message]
2023-08-29 15:55 ` kernel test robot

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=ZO3+sVKQrQT+Sefj@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@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®