mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 2/4] media: atomisp: queue: remove unused local queue support
Date: Tue, 13 Oct 2026 19:14:33 +0300	[thread overview]
Message-ID: <as5Y6Y6XfME9t70X@ashevche-desk.local> (raw)
In-Reply-To: <20261012230754.1914517-3-vladurares@gmail.com>

On Mon, Oct 12, 2026 at 11:07:51PM +0000, Rareș-Mihai Vladu wrote:
> ia_css_queue_local_init() has no callers, so IA_CSS_QUEUE_TYPE_LOCAL
> is never set and every local queue branch in queue.c is unreachable.
> ia_css_queue_uninit() only tore down local queues and has no callers
> either.
> 
> Remove both functions, the local branches, struct ia_css_queue_local
> and the local member of the struct ia_css_queue union. Only remote
> queues, shared with the SP firmware, are used by the driver.

...

>  /* Queue type specifier */
>  /* Avoiding enums to save space */
> -#define IA_CSS_QUEUE_TYPE_LOCAL  0
>  #define IA_CSS_QUEUE_TYPE_REMOTE 1

This is a slippery slope. 0 can be default by implicit zeroed data type, so you
need to really carefully check all call sites that use qhandle and/or allocate
it. Since there are two possible values only, the IA_CSS_QUEUE_TYPE_REMOTE
must gone together (in case this patch is proved to be correct). TL;DR: there
is more homework to do and clean up more at the end.

...

>  struct ia_css_queue {
> -	u8 type;        /* Specify remote/local type of access */
> +	u8 type;        /* Specify remote type of access */

This is FW interface, I don't think we may drop the comment above.

>  	u8 location;    /* Cell location for queue */
>  	u8 proc_id;     /* Processor id for queue access */
>  	union {
> -		ia_css_circbuf_t cb_local;

Not sure about this, but since it's union the only thing to check is
the sizeof(struct ia_css_queue) to be the same after removal.

>  		struct {
>  			u32 cb_desc_addr; /*Circbuf desc address for remote queues*/
>  			u32 cb_elems_addr; /*Circbuf elements addr for remote queue*/

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-10-13 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 23:07 [PATCH 0/4] media: atomisp: remove the circbuf library Rareș-Mihai Vladu
2026-10-12 23:07 ` [PATCH 1/4] media: atomisp: sh_css_mipi: include assert_support.h directly Rareș-Mihai Vladu
2026-10-13 16:06   ` Andy Shevchenko
2026-10-12 23:07 ` [PATCH 2/4] media: atomisp: queue: remove unused local queue support Rareș-Mihai Vladu
2026-10-13 16:14   ` Andy Shevchenko [this message]
2026-10-12 23:07 ` [PATCH 3/4] media: atomisp: queue: move circbuf types and helpers to queue_comm.h Rareș-Mihai Vladu
2026-10-13 16:20   ` Andy Shevchenko
2026-10-12 23:07 ` [PATCH 4/4] media: atomisp: remove unused circbuf library Rareș-Mihai Vladu
2026-10-13 16:21   ` Andy Shevchenko
2026-10-13  7:38 ` [PATCH 0/4] 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=as5Y6Y6XfME9t70X@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®