From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: broonie@kernel.org, tiwai@suse.com, perex@perex.cz,
amade@asmblr.net, linux-sound@vger.kernel.org
Subject: Re: [PATCH 4/7] ASoC: Intel: catpt: Simplify catpt_stream_find()
Date: Tue, 2 Jun 2026 11:53:05 +0300 [thread overview]
Message-ID: <ah6Z8d4aCSykFaaa@ashevche-desk.local> (raw)
In-Reply-To: <20260601141031.1606847-5-cezary.rojewski@intel.com>
On Mon, Jun 01, 2026 at 04:10:28PM +0200, Cezary Rojewski wrote:
> Code line reduction and more transparent variable naming.
> No functional changes.
...
> +struct catpt_stream_runtime *catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id)
> {
> - struct catpt_stream_runtime *pos, *result = NULL;
> + struct catpt_stream_runtime *stream;
>
> - list_for_each_entry(pos, &cdev->stream_list, node) {
> - if (pos->info.stream_hw_id == stream_hw_id) {
> - result = pos;
> - break;
> - }
> - }
> -
> - return result;
> + list_for_each_entry(stream, &cdev->stream_list, node)
> + if (stream->info.stream_hw_id == stream_hw_id)
> + return stream;
Please, keep a blank line here.
> + return NULL;
> }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-02 8:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 14:10 [PATCH 0/7] ASoC: Intel: catpt: Code cleanup Cezary Rojewski
2026-06-01 14:10 ` [PATCH 1/7] ASoC: Intel: catpt: Utilize lock-guard helper Cezary Rojewski
2026-06-02 8:51 ` Andy Shevchenko
2026-06-01 14:10 ` [PATCH 2/7] ASoC: Intel: catpt: Replace RAM-helpers with resource_xxx() Cezary Rojewski
2026-06-01 18:57 ` Mark Brown
2026-06-01 20:02 ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 3/7] ASoC: Intel: catpt: Simplify the RAM-navigation code Cezary Rojewski
2026-06-01 14:10 ` [PATCH 4/7] ASoC: Intel: catpt: Simplify catpt_stream_find() Cezary Rojewski
2026-06-02 8:53 ` Andy Shevchenko [this message]
2026-06-02 8:59 ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 5/7] ASoC: Intel: catpt: Remove unused WAVES controls Cezary Rojewski
2026-06-02 8:54 ` Andy Shevchenko
2026-06-02 9:01 ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 6/7] ASoC: Intel: catpt: Drop manipulation of the obsolete direction flag Cezary Rojewski
2026-06-01 14:10 ` [PATCH 7/7] ASoC: Intel: catpt: Cleanup components_kcontrols[] Cezary Rojewski
2026-06-02 8:57 ` Andy Shevchenko
2026-06-02 9:04 ` Cezary Rojewski
2026-06-02 8:58 ` [PATCH 0/7] ASoC: Intel: catpt: Code cleanup Andy Shevchenko
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=ah6Z8d4aCSykFaaa@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.