Re: [PATCH v2 1/3] staging: greybus: light: fix memory leak in v4l2 register

2017-08-09 Thread Sakari Ailus
Hi Rui, On Wed, Aug 09, 2017 at 02:20:02PM +0100, Rui Miguel Silva wrote: > Hi Sakari, > On Wed, Aug 09, 2017 at 02:15:53PM +0300, Sakari Ailus wrote: > > From: Rui Miguel Silva > > > > We are allocating memory for the v4l2 flash configuration structure and > > leak it in the

Re: [PATCH v2 2/3] v4l2-flash-led-class: Create separate sub-devices for indicators

2017-08-09 Thread Rui Miguel Silva
Hi, On Wed, Aug 09, 2017 at 02:15:54PM +0300, Sakari Ailus wrote: > The V4L2 flash interface allows controlling multiple LEDs through a single > sub-devices if, and only if, these LEDs are of different types. This > approach scales badly for flash controllers that drive multiple flash LEDs > or

[PATCH] staging: bcm2835-audio: constify snd_pcm_ops structures

2017-08-09 Thread Arvind Yadav
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4

Re: [PATCH] staging: greybus: light: fix memory leak in v4l2 register

2017-08-09 Thread Sakari Ailus
Hi Rui and Johan, On 08/02/17 19:52, Rui Miguel Silva wrote: > We are allocating memory for the v4l2 flash configuration structure and > leak it in the normal path. Just use the stack for this as we do not > use it outside of this function. > > Fixes: 2870b52bae4c ("greybus: lights: add lights

[PATCH v2 0/3] Create sub-device per LED

2017-08-09 Thread Sakari Ailus
Hi folks, The original design decision in the V4L2 flash API allows controlling a two LEDs (an indicator and a flash) through a single sub-device. This covered virtually all flash driver chips back then but this no longer holds as there are many LED driver chips with multiple flash LED outputs.

[PATCH v2 1/3] staging: greybus: light: fix memory leak in v4l2 register

2017-08-09 Thread Sakari Ailus
From: Rui Miguel Silva We are allocating memory for the v4l2 flash configuration structure and leak it in the normal path. Just use the stack for this as we do not use it outside of this function. Fixes: 2870b52bae4c ("greybus: lights: add lights implementation") Reported-by:

[PATCH v2 3/3] v4l2-flash-led-class: Document v4l2_flash_init() references

2017-08-09 Thread Sakari Ailus
The v4l2_flash_init() keeps a reference to the ops struct but not to the config struct (nor anything it contains). Document this. Signed-off-by: Sakari Ailus Acked-by: Pavel Machek --- include/media/v4l2-flash-led-class.h | 6 ++ 1 file changed,

[PATCH] staging: iio: adc: fix error return code in ad7606_par_probe()

2017-08-09 Thread Gustavo A. R. Silva
platform_get_irq() returns an error code, but the ad7606_par driver ignores it and always returns -ENODEV. This is not correct and, prevents -EPROBE_DEFER from being propagated properly. Print and propagate the return value of platform_get_irq on failure. This issue was detected with the help of

[PATCH RESEND] tools: hv: update buffer handling in hv_fcopy_daemon

2017-08-09 Thread Olaf Hering
Currently this warning is triggered when compiling hv_fcopy_daemon: hv_fcopy_daemon.c:216:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] kernel_modver = *(__u32 *)buffer; Convert the send/receive buffer to a union and pass individual

Re: [PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-09 Thread Tony Lindgren
* Boris Brezillon [170804 08:30]: > We are planning to share more code between different NAND based > devices (SPI NAND, OneNAND and raw NANDs), but before doing that > we need to move the existing include/linux/mtd/nand.h file into >

[PATCH] staging: wlan-ng: Fix sparse warning: cast to restricted __le16.

2017-08-09 Thread AbdAllah-MEZITI
The same structure is used in both side, so we dont need to cast. This will fix the following sparse warnings: drivers/staging/wlan-ng/prism2sta.c:1139:13: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1150:24: warning: cast to restricted __le16

[PATCH net-next 04/10] netvsc: check error return when restoring channels and mtu

2017-08-09 Thread Stephen Hemminger
If setting new values fails, and the attempt to restore original settings fails. Then log an error and leave device down. This should never happen, but if it does don't go down in flames. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 16

[PATCH net-next 02/10] netvsc: don't signal host twice if empty

2017-08-09 Thread Stephen Hemminger
When hv_pkt_iter_next() returns NULL, it has already called hv_pkt_iter_close(). Calling it twice can lead to extra host signal. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH net-next 05/10] netvsc: no need to allocate send/receive on numa node

2017-08-09 Thread Stephen Hemminger
The send and receive buffers are both per-device (not per-channel). The associated NUMA node is a property of the CPU which is per-channel therefore it makes no sense to force the receive/send buffer to be allocated on a particular node (since it is a shared resource). Signed-off-by: Stephen

[PATCH net-next 07/10] netvsc: remove unnecessary cast of void pointer

2017-08-09 Thread Stephen Hemminger
Assignment to a typed pointer is sufficient in C. No cast is needed. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c

[PATCH net-next 01/10] netvsc: delay setup of VF device

2017-08-09 Thread Stephen Hemminger
When VF device is discovered, delay bring it automatically up in order to allow userspace to some simple changes (like renaming). Reported-by: Vitaly Kuznetsov Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/hyperv_net.h | 2 +-

[PATCH net-next 09/10] netvsc: allow controlling send/recv buffer size

2017-08-09 Thread Stephen Hemminger
Control the size of the buffer areas via ethtool ring settings. They aren't really traditional hardware rings, but host API breaks receive and send buffer into chunks. The final size of the chunks are controlled by the host. The default value of send and receive buffer area for host DMA is much

[PATCH net-next 08/10] netvsc: remove unnecessary check for NULL hdr

2017-08-09 Thread Stephen Hemminger
The function init_page_array is always called with a valid pointer to RNDIS header. No check for NULL is needed. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 00/10] netvsc: minor fixes and improvements

2017-08-09 Thread Stephen Hemminger
These are non-critical bug fixes, related to functionality now in net-next. 1. delaying the automatic bring up of VF device to allow udev to change name. 2. performance improvement 3. handle MAC address change with VF; mostly propogate the error that VF gives. 4. minor cleanups 5. allow

[PATCH net-next 06/10] netvsc: whitespace cleanup

2017-08-09 Thread Stephen Hemminger
Fix some minor indentation issues. Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index

[PATCH net-next 10/10] netvsc: keep track of some non-fatal overload conditions

2017-08-09 Thread Stephen Hemminger
Add ethtool statistics for case where send chimmeny buffer is exhausted and driver has to fall back to doing scatter/gather send. Also, add statistic for case where ring buffer is full and receive completions are delayed. Signed-off-by: Stephen Hemminger ---

[PATCH net-next 03/10] netvsc: propagate MAC address change to VF slave

2017-08-09 Thread Stephen Hemminger
If VF is slaved to synthetic device, then any change to netvsc MAC address should be propagated to the slave device. If slave device doesn't support MAC address change then it should also be an error to attempt to change synthetic NIC MAC address. It also fixes the error unwind in the original

Re: [PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-09 Thread Shawn Guo
On Fri, Aug 04, 2017 at 05:29:10PM +0200, Boris Brezillon wrote: > We are planning to share more code between different NAND based > devices (SPI NAND, OneNAND and raw NANDs), but before doing that > we need to move the existing include/linux/mtd/nand.h file into > include/linux/mtd/rawnand.h so

[PATCH] rtl8723bs: os_dep: ioctl_linux: fix several braces coding style issues.

2017-08-09 Thread Teo Dacquet
Fix checkpatch issues: ERROR: that open brace { should be on the previous line. WARNING: braces {} are not necessary for single statement blocks. Signed-off-by: Teo Dacquet --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 996 - 1 file changed,

[PATCH] Fixed brace positions in a series of if statements.

2017-08-09 Thread Seth Kushniryk
My first try at this. I hope it's alright. Signed-off-by: Seth Kushniryk --- drivers/staging/pi433/pi433_if.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index

Re: [PATCH net-next 0/1] netvsc: another VF datapath fix

2017-08-09 Thread Stephen Hemminger
On Wed, 09 Aug 2017 11:03:05 +0200 Vitaly Kuznetsov wrote: > Stephen Hemminger writes: > > > The following would allow udev a chance at the device. > > > > This would of course work but the approach is a bit hackish and can > still fail on a

Re: [RESEND PATCH] staging: vboxvideo: remove dead gamma lut code

2017-08-09 Thread Daniel Vetter
On Tue, Aug 08, 2017 at 01:54:52PM +0200, Peter Rosin wrote: > On 2017-08-07 11:21, Daniel Vetter wrote: > > On Fri, Aug 04, 2017 at 12:45:06PM +0200, Peter Rosin wrote: > >> The redundant fb helpers .load_lut, .gamma_set and .gamma_get are > >> no longer used. Remove the dead code that was not

Re: [PATCH v2 1/3] staging: greybus: light: fix memory leak in v4l2 register

2017-08-09 Thread Rui Miguel Silva
Hi Sakari, On Wed, Aug 09, 2017 at 02:15:53PM +0300, Sakari Ailus wrote: > From: Rui Miguel Silva > > We are allocating memory for the v4l2 flash configuration structure and > leak it in the normal path. Just use the stack for this as we do not > use it outside of this

[PATCH] Tools: hv: fix snprintf warning in kvp_daemon

2017-08-09 Thread Olaf Hering
Increase buffer size so that "_{-INT_MAX}" will fit. Spotted by the gcc7 snprintf checker. Signed-off-by: Olaf Hering --- tools/hv/hv_kvp_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index