Re: [PATCH] staging: pi433: add rw semaphore fixing concurrency issues

2018-06-02 Thread Hugo Lefeuvre
Hi, > Unless you can measure the performance difference, do not use a rw > semaphore, just use a normal mutex please. Odds are it will be faster > in the end and take up less space. > > So please test, or if you can't test, just use a mutex. I don't have the device yet, so I won't be able to

[PATCH v2] staging: pi433: add mutex fixing concurrency issues.

2018-06-02 Thread Hugo Lefeuvre
Add a mutex fixing a potential NULL pointer dereference in the pi433 driver. If pi433_release and pi433_ioctl are concurrently called, pi433_release might set filp->private_data to NULL while pi433_ioctl is still accessing it, leading to NULL pointer dereference. This issue might also affect

Re: policy on externs

2018-06-02 Thread Justin Skists
On Sat, Jun 02, 2018 at 07:33:46PM +0200, Greg KH wrote: > On Sat, Jun 02, 2018 at 05:23:20PM +0100, Justin Skists wrote: > > Hi, > > > > What is the kernel policy on using "extern" to share variables between > > source files in a module? > > > > I've been looking at one subsystem in staging

Re: policy on externs

2018-06-02 Thread Greg KH
On Sat, Jun 02, 2018 at 05:23:20PM +0100, Justin Skists wrote: > Hi, > > What is the kernel policy on using "extern" to share variables between > source files in a module? > > I've been looking at one subsystem in staging [that shares variables quite a > bit] to becoming familar with it, and

[PATCH v2] staging: vboxvideo: Update driver to use drm_dev_register.

2018-06-02 Thread Fabio Rafael da Rosa
The use of load and unload hooks is deprecated. DRM drivers should use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization and publishing. Signed-off-by: Fabio Rafael da Rosa Reviewed-by: Nicholas Mc Guire --- Changes in v2: - Replace dev_dev_unref (also depretated) by

Re: [PATCH] staging: vboxvideo: Update driver to use drm_dev_register.

2018-06-02 Thread Fabio Rafael da Rosa
On 2018-06-02 09:15, Nicholas Mc Guire wrote: On Sat, Jun 02, 2018 at 08:41:44AM -0300, Fabio Rafael da Rosa wrote: The use of load and unload hooks is deprecated. DRM drivers should use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization and publishing. Signed-off-by: Fabio

policy on externs

2018-06-02 Thread Justin Skists
Hi, What is the kernel policy on using "extern" to share variables between source files in a module? I've been looking at one subsystem in staging [that shares variables quite a bit] to becoming familar with it, and seeing if I can help do some work on it in my free time. Personally I prefer to

Re: [PATCH] staging: vboxvideo: Update driver to use drm_dev_register.

2018-06-02 Thread Nicholas Mc Guire
On Sat, Jun 02, 2018 at 08:41:44AM -0300, Fabio Rafael da Rosa wrote: > The use of load and unload hooks is deprecated. DRM drivers should > use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization > and publishing. > > Signed-off-by: Fabio Rafael da Rosa Reviewed-by: Nicholas Mc

[PATCH] staging: vboxvideo: Update driver to use drm_dev_register.

2018-06-02 Thread Fabio Rafael da Rosa
The use of load and unload hooks is deprecated. DRM drivers should use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization and publishing. Signed-off-by: Fabio Rafael da Rosa --- drivers/staging/vboxvideo/TODO| 1 - drivers/staging/vboxvideo/vbox_drv.c | 33

Re: SPDX identifier question for vboxvideo

2018-06-02 Thread Greg KH
On Fri, Jun 01, 2018 at 04:51:45PM -0300, Fabio Rafael da Rosa wrote: > Hi all, > > I was preparing patch to fix the use of load/unload drm_driver hooks and use > drm_dev_alloc and drm_register. When I was preparing the patch, I run > checkpath and got a warning regarding SPDX tag identifier for