Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
On Sun, Oct 30, 2016 at 8:41 PM, Greg KH wrote: > On Fri, Oct 28, 2016 at 10:37:53AM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated memory >> when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() >> and _r8712_init_xmit_p

Re: [PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-31 Thread Eva Rachel Retuya
On Sun, Oct 30, 2016 at 06:49:00PM +, Jonathan Cameron wrote: > On 30/10/16 17:46, Lars-Peter Clausen wrote: > > On 10/30/2016 06:41 PM, Jonathan Cameron wrote: > >> On 28/10/16 09:26, Eva Rachel Retuya wrote: > >>> Introduce defines for shifting and mask under the config register for > >>> bet

Re: [PATCH v3] staging: iio: cdc: ad7746: add additional config defines

2016-10-31 Thread Eva Rachel Retuya
On Mon, Oct 31, 2016 at 03:49:01PM +0800, Eva Rachel Retuya wrote: > On Sun, Oct 30, 2016 at 06:49:00PM +, Jonathan Cameron wrote: > > On 30/10/16 17:46, Lars-Peter Clausen wrote: > > > On 10/30/2016 06:41 PM, Jonathan Cameron wrote: > > >> On 28/10/16 09:26, Eva Rachel Retuya wrote: > > >>> In

[PATCH] staging: vc04_services: add vchiq_pagelist_info structure

2016-10-31 Thread Michael Zoran
The current dma_map_sg based implementation for bulk messages computes many offsets into a single allocation multiple times in both the create and free code paths. This is inefficient, error prone and in fact still has a few lingering issues with arm64. This change replaces a small portion of tha

[PATCH] Staging:emxx_udc:emxx_udc: Compression of lines for immediate return

2016-10-31 Thread Nadim Almas
This patch compresses two lines into a single line if immediate return statement is found. Remove variable data as it is no longer needed. It is done using script Coccinelle. And coccinelle uses the following semantic patch for this compression function @@ local idexpression ret; expression e; @@

[PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder --- v

Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Greg KH
On Mon, Oct 31, 2016 at 01:08:07PM +0530, Souptick Joarder wrote: > On Sun, Oct 30, 2016 at 8:41 PM, Greg KH wrote: > > On Fri, Oct 28, 2016 at 10:37:53AM +0530, Souptick Joarder wrote: > >> There are few functions where we need to free previously allocated memory > >> when kmalloc fails. Else it

[PATCH 0/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
by adding an int *locked parameter to get_user_pages() callers to this function can now utilise VM_FAULT_RETRY functionality. Taken in conjunction with the patch series adding the same parameter to get_user_pages_remote() this means all slow-path get_user_pages*() functions will now have the abili

[PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
get_user_pages() now has an int *locked parameter which renders get_user_pages_locked() redundant, so remove it. This patch should not introduce any functional changes. Signed-off-by: Lorenzo Stoakes --- include/linux/mm.h | 2 -- mm/frame_vector.c | 4 ++-- mm/gup.c | 56 +

[PATCH 1/2] mm: add locked parameter to get_user_pages()

2016-10-31 Thread Lorenzo Stoakes
This patch adds an int *locked parameter to get_user_pages() to allow VM_FAULT_RETRY faulting behaviour similar to get_user_pages_[un]locked(). It additionally clears the way for get_user_pages_locked() to be removed as its sole remaining useful characteristic was to allow for VM_FAULT_RETRY behav

Re: [PATCH] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

2016-10-31 Thread Vitaly Kuznetsov
KY Srinivasan writes: >> -Original Message- >> From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] >> Sent: Wednesday, October 26, 2016 4:12 AM >> To: de...@linuxdriverproject.org >> Cc: linux-ker...@vger.kernel.org; KY Srinivasan ; >> Haiyang Zhang >> Subject: [PATCH] Drivers: hv: vmbus

RE: [PATCH] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

2016-10-31 Thread Van De Ven, Arjan
> Ok, > > I actually tested boot time with my patch and didn't see a difference > (so I guess our first attempt to send messages usually succeeds) but if > we're concearned about less-than-a-second boot time we'd rather keep the > microseonds delay for first several attempts. I'll do v2. of cours

Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Greg KH
On Mon, Oct 31, 2016 at 02:32:39PM +0530, Souptick Joarder wrote: > There are few functions where we need to free previously allocated > memory when kmalloc fails. Else it may lead to memory leakage. In > _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are > not freeing previously al

Re: [PATCH v3] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
H Greg, On Mon, Oct 31, 2016 at 3:37 PM, Greg KH wrote: > On Mon, Oct 31, 2016 at 02:32:39PM +0530, Souptick Joarder wrote: >> There are few functions where we need to free previously allocated >> memory when kmalloc fails. Else it may lead to memory leakage. In >> _init_cmd_priv() and _r8712_ini

Re: [PATCH] staging: comedi: ni_tio: fix warnings of uninitialized variables

2016-10-31 Thread Ian Abbott
On 30/10/16 15:29, Ted Chen wrote: Fix the following warnings by initializing these variables to zero and add error check to return early when the check returns an error. drivers/staging/comedi/drivers/ni_tio.c: In function ‘ni_tio_set_sync_mode’: drivers/staging/comedi/drivers/ni_tio.c:492:28:

[PATCH] PCI: hv: Make unnecessarily global IRQ masking functions static

2016-10-31 Thread Tobias Klauser
Make hv_irq_mask and hv_irq_unmask static as they are only used in pci-hyperv.c This fixes a sparse warning. Signed-off-by: Tobias Klauser --- drivers/pci/host/pci-hyperv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/p

[PATCH v4] staging : rtl8712: Free memory when kmalloc fails

2016-10-31 Thread Souptick Joarder
There are few functions where we need to free previously allocated memory when kmalloc fails. Else it may lead to memory leakage. In _init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are not freeing previously allocated memory when kmalloc fails. Signed-off-by: Souptick joarder --- v

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Paolo Bonzini
On 31/10/2016 11:02, Lorenzo Stoakes wrote: > - * > - * get_user_pages should be phased out in favor of > - * get_user_pages_locked|unlocked or get_user_pages_fast. Nothing > - * should use get_user_pages because it cannot pass > - * FAULT_FLAG_ALLOW_RETRY to handle_mm_fault. This comment should

Re: [PATCH 12/15] vmbus: make sysfs names consistent with PCI

2016-10-31 Thread Greg KH
On Mon, Oct 31, 2016 at 12:41:47AM -0700, k...@exchange.microsoft.com wrote: > From: Stephen Hemminger > > In commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent") > the name of vmbus devices in sysfs changed to be (in 4.9-rc1): > /sys/bus/vmbus/vmbus-6aebe374-9ba0-11e6-933c-002590

Re: [PATCH 00/15] Drivers: hv: Some miscellaneous fixes and enhancements

2016-10-31 Thread Greg KH
On Mon, Oct 31, 2016 at 12:41:08AM -0700, k...@exchange.microsoft.com wrote: > From: K. Y. Srinivasan > > Some miscellaneous fixes and enhancements. With this patch series applied I get the following build error: ERROR: "vmbus_setevent" [drivers/net/hyperv/hv_netvsc.ko] undefined! I don

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 12:45:36PM +0100, Paolo Bonzini wrote: > > > On 31/10/2016 11:02, Lorenzo Stoakes wrote: > > - * > > - * get_user_pages should be phased out in favor of > > - * get_user_pages_locked|unlocked or get_user_pages_fast. Nothing > > - * should use get_user_pages because it cannot

Re: Greybus Future

2016-10-31 Thread Laurent Pinchart
Hi Alex, On Monday 31 Oct 2016 08:50:53 Alex Elder wrote: > The Greybus kernel code, developed as part of Google's Project Ara, > is in the upstream Linux kernel tree (under drivers/staging). The > cancellation of that project makes the future for Greybus a bit less > certain. There is interest

Greybus Future

2016-10-31 Thread Alex Elder
The Greybus kernel code, developed as part of Google's Project Ara, is in the upstream Linux kernel tree (under drivers/staging). The cancellation of that project makes the future for Greybus a bit less certain. There is interest among the core developers of Greybus (and others) to do what we can

[PATCH 3/7] staging: vchiq_arm: add missing of_node_put

2016-10-31 Thread Stefan Wahren
After device_node usage the refcount must be decremented with of_node_put(). Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging

[PATCH 6/7] staging: vchiq_arm: remove debugfs entries on module unload

2016-10-31 Thread Stefan Wahren
This removes the debugfs entries on module unload and fix one of the many kernel oops after loading the module again. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/interface

[PATCH 2/7] staging: vchiq_core: fix format strings in vchiq_dump_service_state

2016-10-31 Thread Stefan Wahren
The member localport and remoteport are unsigned. So fix the format string accordingly. The issue has been found by Cppcheck. Signed-off-by: Stefam Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/st

[PATCH 5/7] staging: vchiq_arm: handle error case of get_user_pages

2016-10-31 Thread Stefan Wahren
It's possible that get_user_pages() could fail. So evaluate its return code and handle this error case properly. This issue has been found by Cppcheck. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c |8 1 file changed, 8 insertions(+) diff --gi

[PATCH 4/7] staging: vchiq_arm: remove hardcoded buffer length

2016-10-31 Thread Stefan Wahren
We better use sizeof instead of hardcoding buffer length multiple times. This make it easier to increase the buffer in the future. In order to keep below 80 chars limit make the variable name shorter. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c |8

[PATCH 1/7] staging: vchiq_core: fix service dereference in unlock_service

2016-10-31 Thread Stefan Wahren
The service state is dereferenced before BUG_ON and outside of the spin lock. So in order to avoid possible NULL pointer dereferences or races move the whole scope at a safer place. This issue has been found by Cppcheck. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vch

[PATCH 7/7] staging: vchiq_arm: change order during module probe

2016-10-31 Thread Stefan Wahren
The current order during module probe is prone to race conditions: * debugfs entries, sysfs entries, platform code So fix this by swapping the steps debugfs entries and platform code. As a benefit this saves us a clean up step in the error path. Signed-off-by: Stefan Wahren --- .../vc04_servic

RE: [PATCH 00/15] Drivers: hv: Some miscellaneous fixes and enhancements

2016-10-31 Thread KY Srinivasan
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Monday, October 31, 2016 5:46 AM > To: KY Srinivasan > Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com; > jasow...@redhat.com; leann.

RE: [PATCH 12/15] vmbus: make sysfs names consistent with PCI

2016-10-31 Thread KY Srinivasan
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Monday, October 31, 2016 5:44 AM > To: KY Srinivasan > Cc: linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; > o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com; > jasow...@redhat.com; leann.

RE: [PATCH] PCI: hv: Make unnecessarily global IRQ masking functions static

2016-10-31 Thread KY Srinivasan
> -Original Message- > From: Tobias Klauser [mailto:tklau...@distanz.ch] > Sent: Monday, October 31, 2016 4:04 AM > To: KY Srinivasan ; Haiyang Zhang > > Cc: Bjorn Helgaas ; de...@linuxdriverproject.org; > linux-...@vger.kernel.org > Subject: [PATCH] PCI: hv: Make unnecessarily global IR

RE: [PATCH] Drivers: hv: vmbus: Raise retry/wait limits in vmbus_post_msg()

2016-10-31 Thread KY Srinivasan
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Monday, October 31, 2016 3:05 AM > To: KY Srinivasan > Cc: de...@linuxdriverproject.org; Van De Ven, Arjan > ; linux-ker...@vger.kernel.org; Haiyang Zhang > > Subject: Re: [PATCH] Drivers: hv: vmbus: Rais

[PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-10-31 Thread Eva Rachel Retuya
The name passed to devm_regulator_get() should match the name of the supply as specified in the device datasheet. This makes it clear what power supply is being referred to in case of presence of other regulators. Currently, the supply name specified on the affected devices is 'vcc'. Use lowercase

[PATCH 3/6] staging: iio: ad7192: add DVdd regulator

2016-10-31 Thread Eva Rachel Retuya
The AD7190/AD7192/AD7193/AD7195 is supplied with two power sources: AVdd as analog supply voltage and DVdd as digital supply voltage. Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error occurs. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/st

[PATCH 0/6] staging: iio: regulator clean-up

2016-10-31 Thread Eva Rachel Retuya
Rework regulator handling: * use supply names found on the datasheet * fix regulator usage * declare digital supplies previously missing Semantic patch used to detect affected drivers: @r1@ expression reg; position p; @@ reg = \(devm_regulator_get@p\|regulator_get@p\)(...); if (IS_ERR(reg)) {

[PATCH 2/6] staging: iio: rework regulator handling

2016-10-31 Thread Eva Rachel Retuya
Currently, the affected drivers ignore all errors from regulator_get(). The way it is now, it also breaks probe deferral (EPROBE_DEFER). The correct behavior is to propagate the error to the upper layers so they can handle it accordingly. Rework the regulator handling so that it matches the standa

[PATCH 5/6] staging: iio: ad9832: add DVDD regulator

2016-10-31 Thread Eva Rachel Retuya
The AD9832/AD9835 is supplied with two power sources: AVDD as analog supply voltage and DVDD as digital supply voltage. Attempt to fetch and enable the regulator 'dvdd'. Bail out if any error occurs. Suggested-by: Lars-Peter Clausen Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/freq

[PATCH 6/6] staging: iio: ad9832: clean-up regulator 'reg'

2016-10-31 Thread Eva Rachel Retuya
Rename regulator 'reg' to 'avdd' so as to be clear what regulator it stands for specifically. Additionally, get rid of local variable 'reg' and use direct assignment instead. Update also the goto label pertaining to the avdd regulator during disable. Signed-off-by: Eva Rachel Retuya --- drivers/

[PATCH 4/6] staging: iio: ad7192: rename regulator 'reg' to 'avdd'

2016-10-31 Thread Eva Rachel Retuya
Rename regulator 'reg' to 'avdd' so as to be clear what regulator it stands for specifically. Also, update the goto label accordingly. Signed-off-by: Eva Rachel Retuya --- drivers/staging/iio/adc/ad7192.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [PATCH 2/3] staging: most: hdm-usb: do h/w specific synchronization at configuration time

2016-10-31 Thread Dan Carpenter
Yes yes. I wasn't commenting on the patch, which seems fine. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Paolo Bonzini
On 31/10/2016 14:48, Lorenzo Stoakes wrote: > On Mon, Oct 31, 2016 at 12:45:36PM +0100, Paolo Bonzini wrote: >> >> >> On 31/10/2016 11:02, Lorenzo Stoakes wrote: >>> - * >>> - * get_user_pages should be phased out in favor of >>> - * get_user_pages_locked|unlocked or get_user_pages_fast. Nothing

Re: [PATCH] PCI: hv: Make unnecessarily global IRQ masking functions static

2016-10-31 Thread Bjorn Helgaas
On Mon, Oct 31, 2016 at 12:04:09PM +0100, Tobias Klauser wrote: > Make hv_irq_mask and hv_irq_unmask static as they are only used in > pci-hyperv.c > > This fixes a sparse warning. > > Signed-off-by: Tobias Klauser Applied with KY's ack to pci/host-hv for v4.10, thanks! > --- > drivers/pci/ho

Re: [PATCH] staging: vc04_services: call sg_init_table to init scatterlist

2016-10-31 Thread Eric Anholt
Michael Zoran writes: > Call the sg_init_table function to correctly initialze > the DMA scatterlist. This function is required to completely > initialize the list and is mandatory if DMA debugging is > enabled in the build configuration. > > One of the purposes of sg_init_table is to set > the

Re: [PATCH] staging: vc04_services: setup DMA and coherent mask

2016-10-31 Thread Eric Anholt
Michael Zoran writes: > Setting the DMA mask is optional on 32 bit but > is mandatory on 64 bit. Set the DMA mask and coherent > to force all DMA to be in the 32 bit address space. > > This is considered a "good practice" and most drivers > already do this. > > Signed-off-by: Michael Zoran > --

Re: [PATCH] staging: vc04_services: setup DMA and coherent mask

2016-10-31 Thread Michael Zoran
On Mon, 2016-10-31 at 11:36 -0700, Eric Anholt wrote: > Michael Zoran writes: > > > Setting the DMA mask is optional on 32 bit but > > is mandatory on 64 bit.  Set the DMA mask and coherent > > to force all DMA to be in the 32 bit address space. > > > > This is considered a "good practice" and m

Re: [PATCH 2/2] mm: remove get_user_pages_locked()

2016-10-31 Thread Lorenzo Stoakes
On Mon, Oct 31, 2016 at 06:55:33PM +0100, Paolo Bonzini wrote: > > 2. There is currently only one caller of get_user_pages_locked() in > >mm/frame_vector.c which seems to suggest this function isn't widely > >used/known. > > Or not widely necessary. :) Well, quite :) > > > 3. This change r

Re: [PATCH] staging: vc04_services: setup DMA and coherent mask

2016-10-31 Thread Michael Zoran
On Mon, 2016-10-31 at 11:40 -0700, Michael Zoran wrote: > On Mon, 2016-10-31 at 11:36 -0700, Eric Anholt wrote: > > Michael Zoran writes: > > > > > Setting the DMA mask is optional on 32 bit but > > > is mandatory on 64 bit.  Set the DMA mask and coherent > > > to force all DMA to be in the 32 bi

Re: [PATCH] staging: vc04_services: setup DMA and coherent mask

2016-10-31 Thread Michael Zoran
On Mon, 2016-10-31 at 12:53 -0700, Michael Zoran wrote: > On Mon, 2016-10-31 at 11:40 -0700, Michael Zoran wrote: > > On Mon, 2016-10-31 at 11:36 -0700, Eric Anholt wrote: > > > Michael Zoran writes: > > > > > > > Setting the DMA mask is optional on 32 bit but > > > > is mandatory on 64 bit.  Set

[PATCH v2] staging: vc04_services: setup DMA and coherent mask

2016-10-31 Thread Michael Zoran
VCHI messages between the CPU and firmware use 32-bit bus addresses. Explicitly set the DMA mask and coherent on all platforms. Signed-off-by: Michael Zoran --- .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/s

[PATCH] staging: sm750fb: Replace pr_*() with dev_*().

2016-10-31 Thread Elise Lennion
dev_*() functions print identifying information about the struct device and should be used instead of pr_*() whenever possible. Signed-off-by: Elise Lennion --- drivers/staging/sm750fb/sm750.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/sm750f

Re: [PATCH 1/6] staging: iio: set proper supply name to devm_regulator_get()

2016-10-31 Thread Matt Ranostay
On Mon, Oct 31, 2016 at 10:04 AM, Eva Rachel Retuya wrote: > The name passed to devm_regulator_get() should match the name of the > supply as specified in the device datasheet. This makes it clear what > power supply is being referred to in case of presence of other > regulators. > > Currently, th

[PATCH 1/1] vmbus: make sysfs names consistent with PCI

2016-10-31 Thread kys
From: Stephen Hemminger In commit 9a56e5d6a0ba ("Drivers: hv: make VMBus bus ids persistent") the name of vmbus devices in sysfs changed to be (in 4.9-rc1): /sys/bus/vmbus/vmbus-6aebe374-9ba0-11e6-933c-00259086b36b The prefix ("vmbus-") is redundant and differs from how PCI is represented in s