[PATCH 7/7] staging: media: Do not use multiple blank lines

2017-03-02 Thread simran singhal
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/

[PATCH 5/7] staging: media: Remove multiple assignments

2017-03-02 Thread simran singhal
Remove multiple assignments by factorizing them. Problem found using checkpatch.pl CHECK: multiple assignments should be avoided Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/med

[PATCH] staging: fbtft: fb_sh1106: use own implementation of write_register

2017-03-02 Thread Heiner Kallweit
The default implementation of write_register keeps DC low for the first byte only. SH1106 requires DC to be low for all bytes of a multi-byte command. To deal with this limitation we currently use a separate call to write_reg for each single command byte what is not really efficient. Therefore ove

Re: [RESEND PATCH V4] staging: vchiq_arm: Add compatibility wrappers for ioctls

2017-03-02 Thread Stefan Wahren
> Michael Zoran hat am 2. März 2017 um 04:41 geschrieben: > > > This patch adds compatibility wrappers for the ioctls > exposed by vchiq/vc04_services. The compat ioctls are > completely implemented on top of the native ioctls. No > existing lines are modified. > > While the ideal approach w

Re: [RESEND PATCH V4] staging: vchiq_arm: Add compatibility wrappers for ioctls

2017-03-02 Thread Michael Zoran
On Thu, 2017-03-02 at 21:07 +0100, Stefan Wahren wrote: > > Michael Zoran hat am 2. März 2017 um 04:41 > > geschrieben: > > > +static long > > +vchiq_compat_ioctl_dump_phys_mem(struct file *file, > > +  unsigned int cmd, > > +  unsigned long arg

[PATCH] staging: nvec: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 1/2] Fix sparse warnings by using appropriate endian types

2017-03-02 Thread Adrien Descamps
Fix some sparse warning by using correct endian types in structs and local variables. This patch only fix sparse warnings and do not change the logic. Compile tested only. Signed-off-by: Adrien Descamps --- drivers/staging/wlan-ng/hfa384x.h | 58 +-- drivers/s

[PATCH 2/2] Fix endiannes error

2017-03-02 Thread Adrien Descamps
sparse report fixed: drivers/staging//wlan-ng//hfa384x_usb.c:3517:35: warning: restricted __be64 degrades to integer drivers/staging//wlan-ng//hfa384x_usb.c:3517:33: warning: incorrect type in assignment (different base types) drivers/staging//wlan-ng//hfa384x_usb.c:3517:33:expected restricte

[PATCH 1/3] staging: fbtft: add helper fbtft_write_buf_dc

2017-03-02 Thread Heiner Kallweit
Factor out setting DC GPIO and writing buffer content to helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit --- drivers/staging/fbtft/fbtft-core.c | 15 +++ drivers/staging/fbtft/fbtft.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/staging/fbtft/fbtft-c

[PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/mgc/

[PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rts5208/rtsx_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rtl8712/rtl8712_recv.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 2/3] staging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.c

2017-03-02 Thread Heiner Kallweit
Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit --- drivers/staging/fbtft/fbtft-bus.c | 31 --- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index ec4504

[PATCH 2/5] staging: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 de

[PATCH 3/3] staging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dc

2017-03-02 Thread Heiner Kallweit
Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit --- drivers/staging/fbtft/fb_sh1106.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/staging/fbtft/fb_sh1106.c b/drivers/staging/fbtft/fb_sh1106.c index d6f79bbd..45999c3c 1

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread Joe Perches
On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: > The following Coccinelle script was used to detect this: > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > > > > ((T *)x)[...] > > > > ((T*)x)->f > > > > - (T*) > e > ) NAK. Nice, but you stil

[RFC PATCH 00/12] Ion cleanup in preparation for moving out of staging

2017-03-02 Thread Laura Abbott
Hi, There's been some recent discussions[1] about Ion-like frameworks. There's apparently interest in just keeping Ion since it works reasonablly well. This series does what should be the final clean ups for it to possibly be moved out of staging. This includes the following: - Some general clean

[RFC PATCH 01/12] staging: android: ion: Remove dmap_cnt

2017-03-02 Thread Laura Abbott
The reference counting of dma_map calls was removed. Remove the associated counter field as well. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion_priv.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/android/ion/ion_priv.h b/drivers/staging/android/ion/io

[RFC PATCH 02/12] staging: android: ion: Remove alignment from allocation field

2017-03-02 Thread Laura Abbott
The align field was supposed to be used to specify the alignment of the allocation. Nobody actually does anything with it except to check if the alignment specified is out of bounds. Since this has no effect on the actual allocation, just remove it. Signed-off-by: Laura Abbott --- drivers/stagi

[RFC PATCH 03/12] staging: android: ion: Duplicate sg_table

2017-03-02 Thread Laura Abbott
Ion currently returns a single sg_table on each dma_map call. This is incorrect for later usage. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.c

[RFC PATCH 07/12] staging: android: ion: Remove old platform support

2017-03-02 Thread Laura Abbott
Device specific platform support has been haphazard for Ion. There have been several independent attempts and there are still objections to what bindings exist right now. Just remove everything for a fresh start. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/Kconfig

[RFC PATCH 05/12] staging: android: ion: Remove page faulting support

2017-03-02 Thread Laura Abbott
The new method of syncing with dma_map means that the page faulting sync implementation is no longer applicable. Remove it. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion.c | 117 -- 1 file changed, 117 deletions(-) diff --git a/drivers/stag

[RFC PATCH 08/12] cma: Store a name in the cma structure

2017-03-02 Thread Laura Abbott
Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it useful to have an explicit name attached to each region. Store the name in each CMA structure. Signed-off-by: Laura Abbott --- drivers/base/dma-contiguous.c | 5 +++-- include/linux/cma.h | 4 +++- mm/cma.c

[RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-02 Thread Laura Abbott
Technically, calling dma_buf_map_attachment should return a buffer properly dma_mapped. Add calls to dma_map_sg to begin_cpu_access to ensure this happens. As a side effect, this lets Ion buffers take advantage of the dma_buf sync ioctls. Signed-off-by: Laura Abbott --- drivers/staging/android/

[RFC PATCH 06/12] staging: android: ion: Remove crufty cache support

2017-03-02 Thread Laura Abbott
Now that we call dma_map in the dma_buf API callbacks there is no need to use the existing cache APIs. Remove the sync ioctl and the existing bad dma_sync calls. Explicit caching can be handled with the dma_buf sync API. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion-ioctl.c

[RFC PATCH 10/12] staging: android: ion: Use CMA APIs directly

2017-03-02 Thread Laura Abbott
When CMA was first introduced, its primary use was for DMA allocation and the only way to get CMA memory was to call dma_alloc_coherent. This put Ion in an awkward position since there was no device structure readily available and setting one up messed up the coherency model. These days, CMA can b

[RFC PATCH 09/12] cma: Introduce cma_for_each_area

2017-03-02 Thread Laura Abbott
Frameworks (e.g. Ion) may want to iterate over each possible CMA area to allow for enumeration. Introduce a function to allow a callback. Signed-off-by: Laura Abbott --- include/linux/cma.h | 2 ++ mm/cma.c| 14 ++ 2 files changed, 16 insertions(+) diff --git a/include

[RFC PATCH 11/12] staging: android: ion: Make Ion heaps selectable

2017-03-02 Thread Laura Abbott
Currently, all heaps are compiled in all the time. In switching to a better platform model, let's allow these to be compiled out for good measure. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/Kconfig| 32 drivers/staging/android/ion/Makefile | 8 +++--

[RFC PATCH 12/12] staging; android: ion: Enumerate all available heaps

2017-03-02 Thread Laura Abbott
Practiaclly speaking, most Ion heaps are either going to be available all the time (system heaps) or found based off of the reserved-memory node. Parse the CMA and reserved-memory nodes to assign the heaps. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/Makefile| 2 +- dri

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: >> The following Coccinelle script was used to detect this: >> @r@ >> expression x; >> void* e; >> type T; >> identifier f; >> @@ >> ( >> *((T *)e) >> > >> >> ((T *)x)[...] >> > >> >>

Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-02 Thread Julia Lawall
> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void *pcontext) > { > unsigned long irql; > struct recv_reorder_ctrl *preorder_ctrl = > - (struct recv_reorder_ctrl *)pcontext; > + pcontext; Coccinelle doesn't a

Re: [Outreachy kernel] [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-02 Thread Julia Lawall
> diff --git a/drivers/staging/rts5208/rtsx_transport.c > b/drivers/staging/rts5208/rtsx_transport.c > index 2379901..d745b93 100644 > --- a/drivers/staging/rts5208/rtsx_transport.c > +++ b/drivers/staging/rts5208/rtsx_transport.c > @@ -767,7 +767,7 @@ int rtsx_transfer_data(struct rtsx_chip *chip

Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote: >> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void >> *pcontext) >> { >> unsigned long irql; >> struct recv_reorder_ctrl *preorder_ctrl = >> - (struct recv_reorder_ctrl *)pcontext; >>

Re: [Outreachy kernel] [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote: >> diff --git a/drivers/staging/rts5208/rtsx_transport.c >> b/drivers/staging/rts5208/rtsx_transport.c >> index 2379901..d745b93 100644 >> --- a/drivers/staging/rts5208/rtsx_transport.c >> +++ b/drivers/staging/rts5208/rtsx_transport.c >> @@ -76

[PATCH] staging: speakup: Fixed coding style errors and aligned indents

2017-03-02 Thread Tuomo Rinne
Fixed indentation to use tabs and aligned all the fields to same level. Signed-off-by: Tuomo Rinne --- drivers/staging/speakup/speakup_decpc.c | 90 - 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/drivers/staging/speakup/speakup_decpc.c b/driver

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches wrote: > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote: >> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: >> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: >> > > The following Coccinelle script was used to detect this: >> > >

Re: [Outreachy kernel] Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread Julia Lawall
On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote: > On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches wrote: > > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote: > >> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: > >> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: > >> > > The follo

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread Joe Perches
On Fri, 2017-03-03 at 03:35 +0530, SIMRAN SINGHAL wrote: > On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches wrote: > > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote: > > > On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: > > > > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: > >

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread Joe Perches
On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote: > On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: > > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: > > > The following Coccinelle script was used to detect this: > > > @r@ > > > expression x; > > > void* e; > > > type T; > > >

[PATCH] staging: rtl8192u: fix spacing around if statements

2017-03-02 Thread Robin Krahl
Corrects the spacing around two if statements to fix these checkpatch.pl errors: ERROR: space required before the open brace '{' ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Robin Krahl --- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 1 file changed, 2 insertions(+

Re: [PATCH] netvsc: fix use-after-free in netvsc_change_mtu()

2017-03-02 Thread David Miller
From: Dexuan Cui Date: Thu, 2 Mar 2017 13:00:53 + > 'nvdev' is freed in rndis_filter_device_remove -> netvsc_device_remove -> > free_netvsc_device, so we mustn't access it, before it's re-created in > rndis_filter_device_add -> netvsc_device_add. > > Signed-off-by: Dexuan Cui Applied.

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 07:53 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:15PM -0800, Steve Longerbeam wrote: Add a new FRAME_TIMEOUT event to signal that a video capture or output device has timed out waiting for reception or transmit completion of a video frame. Signed-off-by: St

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video device. Signed-off-by: Steve Longerbeam --- drivers/me

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 03:48 PM, Steve Longerbeam wrote: On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video device

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Steve Longerbeam
On 03/02/2017 03:48 PM, Steve Longerbeam wrote: On 03/02/2017 08:02 AM, Sakari Ailus wrote: Hi Steve, On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: v4l2_pipeline_inherit_controls() will add the v4l2 controls from all subdev entities in a pipeline to a given video device

<    1   2