[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0e51146-6f6c-46d7-bfea-277092cfbd7b@ideasonboard.com>
Date: Sat, 31 Aug 2024 20:35:04 +0530
From: Umang Jain <umang.jain@...asonboard.com>
To: Arnd Bergmann <arnd@...db.de>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org, Dan Carpenter <dan.carpenter@...aro.org>,
"laurent.pinchart" <laurent.pinchart@...asonboard.com>,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Stefan Wahren <wahrenst@....net>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Phil Elwell <phil@...pberrypi.com>
Subject: Re: [PATCH 4/7] staging: vchiq_core: Factor out bulk transfer for
(no/)callback mode
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
Powered by blists - more mailing lists