[PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation

2019-04-28 Thread Nicholas Mc Guire
While the endiannes is being handled correctly sparse was unhappy with the missing annotation as be16_to_cpu() expects a __be16. The __force cast to __be16 makes sparse happy but has no impact on the generated binary. Signed-off-by: Nicholas Mc Guire --- Problem reported by sparse V2: As reque

[PATCH V3] staging: fieldbus: anybus-s: consolidate wait_for_completion_timeout return handling

2019-04-28 Thread Nicholas Mc Guire
wait_for_completion_timeout() returns unsigned long (0 on timeout or remaining jiffies) not int - so this type error allows for a theoretically int overflow - though not in this case where TIMEOUT is only HZ*2). To fix this type inconsistency the completion is wrapped into the if() rather than intr

[PATCH] staging: rtl8723bs: core: Remove blank line.

2019-04-28 Thread Vatsala Narang
To avoid style issues, remove multiple blank lines. Signed-off-by: Vatsala Narang --- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c index 2474fa6fb4

[PATCH] staging: rtl8723bs: core: Remove else after return statement.

2019-04-28 Thread Vatsala Narang
Remove else after return statement as it is not useful. Issue found using checkpatch. Signed-off-by: Vatsala Narang --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/

[PATCH 2/2] staging: rtl8723bs: core: Remove else after return statement.

2019-04-28 Thread Vatsala Narang
Remove else after return statement as it is not useful. Issue found using checkpatch. Signed-off-by: Vatsala Narang --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/

Re: [PATCH] media: staging/imx: add media device to capture register

2019-04-28 Thread Rui Miguel Silva
Hi Steve, On Sun 28 Apr 2019 at 19:53, Steve Longerbeam wrote: > Hi Rui, > > On second thought, there is no reason to pass the media device to > imx_media_capture_device_register(), because it is already available via > v4l2_dev->mdev. I will be posting a patch in v2 of the "Switch to sync > reg

[PATCH v2 8/8] media: staging/imx: Don't set driver data for v4l2_dev

2019-04-28 Thread Steve Longerbeam
The media device is already available via multiple methods, there is no need to set driver data for v4l2_dev to the media device. In imx_media_link_notify(), get media device from link->graph_obj.mdev. In imx_media_capture_device_register(), get media device from v4l2_dev->mdev. Signed-off-by: S

[PATCH v2 5/8] media: staging/imx: Remove capture_device_set_format

2019-04-28 Thread Steve Longerbeam
Don't propagate the source pad format to the connected capture device. It's now the responsibility of userspace to call VIDIOC_S_FMT on the capture device to ensure the capture format and compose rectangle are compatible with the connected source. To check this, validate the capture format with the

[PATCH v2 7/8] media: staging/imx: Improve pipeline searching

2019-04-28 Thread Steve Longerbeam
Export find_pipeline_pad(), renaming to imx_media_pipeline_pad(), and extend its functionality to allow searching for video devices in the enabled pipeline in addition to sub-devices. As part of this: - Rename imx_media_find_mipi_csi2_channel() to imx_media_pipeline_csi2_channel(). - Remove im

[PATCH v2 4/8] Revert "media: imx: Set capture compose rectangle in capture_device_set_format"

2019-04-28 Thread Steve Longerbeam
Rvert this commit, as imx_media_capture_device_set_format() will be removed. This reverts commit 5964cbd8692252615370b77eb96764dd70c2f837. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 5 ++-- drivers/staging/media/imx/imx-media-capture.c | 24 +---

[PATCH v2 2/8] media: staging/imx: Pass device to alloc/free_dma_buf

2019-04-28 Thread Steve Longerbeam
Allocate and free a DMA coherent buffer in imx_media_alloc/free_dma_buf() from the given device. This allows DMA alloc and free using a device that is backed by real hardware, which for the imx5/6/7 CSI is the CSI unit, and for the internal IPU sub-devices, is the parent IPU. Signed-off-by: Steve

[PATCH v2 1/8] media: staging/imx: Switch to sync registration for IPU subdevs

2019-04-28 Thread Steve Longerbeam
Because the IPU sub-devices VDIC and IC are not present in the device-tree, platform devices were created for them instead. This allowed these sub-devices to be added to the media device's async notifier and registered asynchronously along with the other sub-devices that do have a device-tree prese

[PATCH v2 6/8] media: staging/imx: Re-organize modules

2019-04-28 Thread Steve Longerbeam
Re-organize modules, and which objects are linked into those modules, so that: - imx6-media (renamed from imx-media) is the media driver module for imx5/6 only, and has no symbol exports. The IPU internal subdevice objects now link directly with imx6-media. - imx6-media-csi (renamed from imx-

[PATCH v2 3/8] media: staging/imx: Move add_video_device into capture_device_register

2019-04-28 Thread Steve Longerbeam
Move imx_media_add_video_device() into imx_media_capture_device_register(). Also the former has no error conditions to convert to void. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-ic-prpencvf.c | 5 - drivers/staging/media/imx/imx-media-capture.c | 3 +++ drivers/st

Re: [PATCH] media: staging/imx: add media device to capture register

2019-04-28 Thread Steve Longerbeam
Hi Rui, On second thought, there is no reason to pass the media device to imx_media_capture_device_register(), because it is already available via v4l2_dev->mdev. I will be posting a patch in v2 of the "Switch to sync registration for IPU subdevs" series that fixes this. Steve On 4/12/19 9

Re: [PATCH] staging: fieldbus: anybus-s: force endiannes annotation

2019-04-28 Thread Sven Van Asbroeck
Thanks for the contibution! See inline. On Sat, Apr 27, 2019 at 10:39 PM Nicholas Mc Guire wrote: > > While the endiannes is being handled correctly sparse was unhappy with > the missing annotation as be16_to_cpu() expects a __be16. Your commit message has room for improvement here. See my remar

Re: [PATCH V2] staging: fieldbus: anybus-s: consolidate wait_for_completion_timeout return handling

2019-04-28 Thread Sven Van Asbroeck
Looking good, but see inline. On Sat, Apr 27, 2019 at 10:39 PM Nicholas Mc Guire wrote: > > wait_for_completion_timeout() returns unsigned long (0 on timeout or > remaining jiffies) not int - so rather than introducing an additional > variable simply wrap the completion into an if(). Your commit