From: "Arnd Bergmann" <arnd@arndb.de>
To: "Umang Jain" <umang.jain@ideasonboard.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"laurent.pinchart" <laurent.pinchart@ideasonboard.com>,
"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
"Stefan Wahren" <wahrenst@gmx.net>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Phil Elwell" <phil@raspberrypi.com>
Subject: Re: [PATCH 1/7] staging: vchiq: Factor out bulk transfer for VCHIQ_BULK_MODE_WAITING
Date: Fri, 23 Aug 2024 15:23:42 +0000 [thread overview]
Message-ID: <8174beea-9260-4248-abb5-4104a886b905@app.fastmail.com> (raw)
In-Reply-To: <20240823-to_sent2-v1-1-8bc182a0adaf@ideasonboard.com>
On Fri, Aug 23, 2024, at 15:14, Umang Jain wrote:
> The bulk transfer is VCHIQ_BULK_MODE_WAITING is used by VCHIQ ioctl
> interface. It is factored out to a separate function from
> vchiq_bulk_transfer() to bulk_xfer_waiting_interruptible().
>
> This is a part of vchiq_bulk_transfer refactoring. Each bulk mode
> will have their dedicated functions to execute bulk transfers.
> Each mode will be handled separately in subsequent patches.
>
> bulk_xfer_waiting_interruptible() is suffixed with "_interruptible"
> to denote that it can be interrupted when a signal is received.
> -EAGAIN maybe returned in those cases, similar to what
> vchiq_bulk_transfer() does.
>
> Adjust the vchiq_irq_queue_bulk_tx_rx() in the vchiq-dev.c to call
> bulk_xfer_waiting_interruptible() for waiting mode. A temporary
> goto label has been introduced to jump the call execution over
> vchiq_bulk_transfer() for waiting mode only. When all dedicated bulk
> transfer calls are introduced, this label shall be dropped.
>
> No function changes intended in this patch.
>
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
This looks reasonable, just one think I would change:
> +int
> +bulk_xfer_waiting_interruptible(struct vchiq_instance *instance,
> unsigned int handle,
> + void *userdata)
> +{
> + struct vchiq_service *service = find_service_by_handle(instance,
> handle);
> + struct bulk_waiter *bulk_waiter = NULL;
> +
> + bulk_waiter = userdata;
Since you always pass a 'struct bulk_waiter' here, please
replace the 'void *userdata' with the typed argument directly.
Arnd
next prev parent reply other threads:[~2024-08-23 15:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 15:14 [PATCH 0/7] staging: vchiq_core: Refactor vchiq_bulk_transfer() logic Umang Jain
2024-08-23 15:14 ` [PATCH 1/7] staging: vchiq: Factor out bulk transfer for VCHIQ_BULK_MODE_WAITING Umang Jain
2024-08-23 15:23 ` Arnd Bergmann [this message]
2024-08-23 21:28 ` Stefan Wahren
2024-08-23 15:14 ` [PATCH 2/7] staging: vchiq_core: Simplify vchiq_bulk_transfer() Umang Jain
2024-08-23 15:14 ` [PATCH 3/7] staging: vchiq_core: Factor out bulk transfer for blocking mode Umang Jain
2024-08-23 21:36 ` Stefan Wahren
2024-08-23 15:14 ` [PATCH 4/7] staging: vchiq_core: Factor out bulk transfer for (no/)callback mode Umang Jain
2024-08-23 15:33 ` Laurent Pinchart
2024-08-23 15:41 ` Arnd Bergmann
2024-08-31 15:05 ` Umang Jain
2024-08-23 15:14 ` [PATCH 5/7] staging: vchiq_core: Drop vchiq_bulk_transfer() Umang Jain
2024-08-23 15:14 ` [PATCH 6/7] staging: vchiq_core: Remove unused function argument Umang Jain
2024-08-23 21:47 ` Stefan Wahren
2024-08-23 15:14 ` [PATCH 7/7] staging: vchiq_core: Pass enumerated flag instead of int Umang Jain
2024-08-23 21:50 ` Stefan Wahren
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=8174beea-9260-4248-abb5-4104a886b905@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dan.carpenter@linaro.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@raspberrypi.com \
--cc=umang.jain@ideasonboard.com \
--cc=wahrenst@gmx.net \
/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®