From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Rareș-Mihai Vladu" <vladurares@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Andy Shevchenko <andy@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/5] media: atomisp: queue: move remote queue handling into helpers
Date: Thu, 29 Oct 2026 15:12:29 +0200 [thread overview]
Message-ID: <auNGPTeZWYXKrE9c@ashevche-desk.local> (raw)
In-Reply-To: <20261027230807.2407261-3-vladurares@gmail.com>
On Tue, Oct 27, 2026 at 11:08:04PM +0000, Rareș-Mihai Vladu wrote:
> Move the remote queue branch of every queue operation into its own
> static helper, written the way the function is meant to look once the
> unused local queue support is gone, and call it from the existing
> function after the local branch.
>
> While at it, tidy up the moved code: drop the redundant parentheses
> and '!= 0' comparisons, use !ptr instead of comparing to NULL, and
> return the result of the final ia_css_queue_store() call directly.
>
> This prepares for removing the local queue support in the next patch
> and keeps that change easy to review. No functional change intended.
...
> +int ia_css_queue_enqueue(ia_css_queue_t *qhandle, uint32_t item)
> int ia_css_queue_dequeue(ia_css_queue_t *qhandle, uint32_t *item)
> int ia_css_queue_get_free_space(ia_css_queue_t *qhandle, uint32_t *size)
> int ia_css_queue_get_used_space(ia_css_queue_t *qhandle, uint32_t *size)
> int ia_css_queue_peek(ia_css_queue_t *qhandle, u32 offset, uint32_t *element)
> int ia_css_queue_get_size(ia_css_queue_t *qhandle, uint32_t *size)
This change is okay, just a comment for further possible cleanup.
Please, consider making driver use uXX/sXX types over uintXX_t/intXX_t
for the kernel-only code and the respective double underscore for ABI
data types (I'm not sure about firmware protocol, it's strictly speaking
an ABI, but sometimes we use internal types) — __uXX/__sXX.
Maybe not entire driver at once (can be tons of lines to change), but small
step first to check if the approach is correct.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-10-29 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 23:08 [PATCH v4 0/5] media: atomisp: remove the circbuf library Rareș-Mihai Vladu
2026-10-27 23:08 ` [PATCH v4 1/5] media: atomisp: sh_css_mipi: include assert_support.h directly Rareș-Mihai Vladu
2026-10-27 23:08 ` [PATCH v4 2/5] media: atomisp: queue: move remote queue handling into helpers Rareș-Mihai Vladu
2026-10-29 13:12 ` Andy Shevchenko [this message]
2026-10-27 23:08 ` [PATCH v4 3/5] media: atomisp: queue: remove unused local queue support Rareș-Mihai Vladu
2026-10-27 23:08 ` [PATCH v4 4/5] media: atomisp: queue: move circbuf types and helpers to queue_comm.h Rareș-Mihai Vladu
2026-10-27 23:08 ` [PATCH v4 5/5] media: atomisp: remove unused circbuf library Rareș-Mihai Vladu
2026-10-29 13:16 ` [PATCH v4 0/5] media: atomisp: remove the " 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=auNGPTeZWYXKrE9c@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=vladurares@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
all inboxes | Powered by JetHome®