mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Umang Jain <umang.jain@ideasonboard.com>
To: Arnd Bergmann <arnd@arndb.de>,
	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 4/7] staging: vchiq_core: Factor out bulk transfer for (no/)callback mode
Date: Sat, 31 Aug 2024 20:35:04 +0530	[thread overview]
Message-ID: <b0e51146-6f6c-46d7-bfea-277092cfbd7b@ideasonboard.com> (raw)
In-Reply-To: <08aa277d-a966-4785-921e-6a63a2e5922b@app.fastmail.com>

Hi Arnd

On 23/08/24 9:11 pm, Arnd Bergmann wrote:
> On Fri, Aug 23, 2024, at 15:14, Umang Jain wrote:
>
>> +int
>> +bulk_xfer_callback_interruptible(struct vchiq_instance *instance,
>> unsigned int handle,
>> +				 void *offset, void __user *uoffset, int size,
>> +				 enum vchiq_bulk_mode mode, void *userdata,
>> +				 enum vchiq_bulk_dir dir)
> It seems you can also tighten the argument types here a bit more:
>
> - uoffset is always NULL and can be left out

Not true.

in vchiq_dev.c. it is not NULL

This should ideally be split off even more, for in-kernel usage (using 
the kernel pointers only) and for ioctl interface (that uses __user pointer)
> - userdata is either NULL or a struct mmal_msg_context, so you can use
>    that type directly.

It can be NULL, struct mmal_msg_context or a integer pointer - if coming 
through ioctl interface (vchiq_dev.c)

(Checked via checking vchiq_test code)

>
>       Arnd


  reply	other threads:[~2024-08-31 15:05 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
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 [this message]
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=b0e51146-6f6c-46d7-bfea-277092cfbd7b@ideasonboard.com \
    --to=umang.jain@ideasonboard.com \
    --cc=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=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®