Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 04:32:30PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 01:23:57PM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > Check the return value of kzalloc & return error if it fails. > > > > Signed-off-by: Gujulan Elango Hari Prasath > > --- > > drivers/staging/

[PATCH] staging: unisys: visorbus: add static declarations

2015-05-28 Thread Drew Fustini
Add static declarations to statisfy sparse warnings in: drivers/staging/unisys/visorbus/visorbus_main.c warning: symbol 'visorbus_debug' was not declared warning: symbol 'visorbus_forcematch' was not declared warning: symbol 'visorbus_forcenomatch' was not declared warning: symbol 'visor

Re: staging: unisys: Convert bus functions to pass bus_info pointer around

2015-05-28 Thread Don Zickus
On Wed, May 27, 2015 at 07:02:51PM +0300, Dan Carpenter wrote: > Hello Don Zickus, > > This is a semi-automatic email about new static checker warnings. > > The patch 3032aeddd85e: "staging: unisys: Convert bus functions to > pass bus_info pointer around" from May 13, 2015, leads to the > follo

[PATCH 07/13] android: binder: add functions for manipulating transaction stack

2015-05-28 Thread Riley Andrews
Add helper functions for manipulating the transaction stack, and for validating the transaction stack during binder transactions and replies. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 126 +-- 1 file changed, 79 insertions(+), 47 dele

[PATCH 10/13] android: binder: refactor binder_thread_read loop

2015-05-28 Thread Riley Andrews
Add dedicated functions for every work type in the switch statement. Refactor the loop logic to remove the while 1, and make it explicit which work items cause the loop to exit. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 433 +-- 1 fil

[PATCH 02/13] android: binder: fix duplicate error return.

2015-05-28 Thread Riley Andrews
Duplicate errors can be returned to userspace when the thread error code is left set when the read buffer runs out of space. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder.c b/drivers/android/bi

[PATCH 04/13] android: binder: refactor binder_transact handle translation

2015-05-28 Thread Riley Andrews
Add dedicated functions for handling the movement of fds, binder objects, and references across processes. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 311 +-- 1 file changed, 167 insertions(+), 144 deletions(-) diff --git a/drivers/an

[PATCH 12/13] android: binder: add function to pass thread errors to userspace

2015-05-28 Thread Riley Andrews
Add a dedicated function for handling errors. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 51 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index c98436c..a3129d

[PATCH 01/13] drivers: android: correct the size of struct binder_uintptr_t for BC_DEAD_BINDER_DONE

2015-05-28 Thread Riley Andrews
From: Lisa Du There's one point was missed in the patch commit da49889deb34 ("staging: binder: Support concurrent 32 bit and 64 bit processes."). When configure BINDER_IPC_32BIT, the size of binder_uintptr_t was 32bits, but size of void * is 64bit on 64bit system. Correct it here. Signed-off-by:

[PATCH 13/13] android: binder: add function for processing work nodes in binder_thread_read

2015-05-28 Thread Riley Andrews
Split up binder_thread_read into a function for waiting for work and a function for processing the work nodes. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 96 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/drivers/

[PATCH 05/13] android: binder: refactor binder_transact transaction buffer loop

2015-05-28 Thread Riley Andrews
Pull the loop that translates the flat_binder_objects into a separate function, binder_transaction_buffer_acquire. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 128 --- 1 file changed, 77 insertions(+), 51 deletions(-) diff --git a/driv

[PATCH 03/13] android: binder: refactor binder_thread_write

2015-05-28 Thread Riley Andrews
Give every case in the switch statement its own dedicated function. Remove the process argument to binder_transact, as it can be derived from the thread argument as with all of the other newly created functions. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 613

[PATCH 11/13] android: binder: add function to handle waiting for binder_thread_read

2015-05-28 Thread Riley Andrews
Add another helper function for binder_thread_read. All of the logic for waiting for work to do has been pulled into this function. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 104 ++- 1 file changed, 66 insertions(+), 38 deletions(-)

[PATCH 06/13] android: binder: add function to find target binder node

2015-05-28 Thread Riley Andrews
Pull the logic that determines the target_node of a transaction into a dedicated function. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/drivers/android/binder.c b/dri

[PATCH 09/13] android: binder: add function for finding prior thread in transaction stack

2015-05-28 Thread Riley Andrews
Add a helper function to find a thread within a transaction stack. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index f7f2217..abd5556 100

[PATCH 08/13] android: binder: add function for logging failed transactions

2015-05-28 Thread Riley Andrews
Add another helper function that adds log entries to failed log. Signed-off-by: Riley Andrews --- drivers/android/binder.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ed94121..f7f2217 100644 ---

[PATCH V2 net-next 1/2] hv_netvsc: Allocate the receive buffer from the correct NUMA node

2015-05-28 Thread K. Y. Srinivasan
Allocate the receive bufer from the NUMA node assigned to the primary channel. Signed-off-by: K. Y. Srinivasan --- V2: Specify the tree for this patch. drivers/net/hyperv/netvsc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c

[PATCH net-next 2/2] hv_netvsc: Allocate the sendbuf in a NUMA aware way

2015-05-28 Thread K. Y. Srinivasan
Allocate the send buffer in a NUMA aware way. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index d187965..06de98a 100644 --- a/drivers/net/hype

[PATCH net-next 0/2] hv_netvsc: Implement NUMA aware memory allocation

2015-05-28 Thread K. Y. Srinivasan
Allocate both receive buffer and send buffer from the NUMA node assigned to the primary channel. K. Y. Srinivasan (2): hv_netvsc: Allocate the receive buffer from the correct NUMA node hv_netvsc: Allocate the sendbuf in a NUMA aware way drivers/net/hyperv/netvsc.c | 11 +-- 1 files

RE: [PATCH 1/1] hv_netvsc: Allocate the receive buffer from the correct NUMA node

2015-05-28 Thread KY Srinivasan
> -Original Message- > From: K. Y. Srinivasan [mailto:k...@microsoft.com] > Sent: Thursday, May 28, 2015 2:56 PM > To: da...@davemloft.net; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com; jasow...@redhat.com > Cc

Re: [PATCH] staging: ft1000: warning removal: extern functions to static ones

2015-05-28 Thread Xavier Roche
Hi Greg & mailing-list members, On Thu, 28 May 2015, Greg KH wrote: In the future, always use scripts/get_maintainer.pl to determine who to send patches to please. Sorry, I did use the get_maintainer.pl script, but I did not want to bother too many people, and I only picked Marek in CC: (I al

[PATCH 8/9] staging/lustre/mdc: drop unneeded goto

2015-05-28 Thread Julia Lawall
From: Julia Lawall Delete jump to a label on the next line, when that label is not used elsewhere. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier l; @@ -if (...) goto l; -l: // Signed-off-by: Julia Lawall ---

[PATCH 0/9] drop unneeded goto

2015-05-28 Thread Julia Lawall
These patches drop gotos that jump to a label that is at the next instruction, in the case that the label is not used elsewhere in the function. The complete semantic patch that performs this transformation is as follows: // @r@ position p; identifier l; @@ if (...) goto l@p; l: @script:ocaml

Re: [PATCH] staging: wilc1000 dead code removal

2015-05-28 Thread Greg KH
On Thu, May 28, 2015 at 10:23:35PM +0200, Arnd Bergmann wrote: > Subject: [PATCH] staging: wilc1000 dead code removal > > After finding some build errors in wilc1000, I played some more with > the driver and eliminated a lot of unused code. This is all code > meant for OS abstraction. Since we kno

[PATCH 1/1] hv_netvsc: Allocate the receive buffer from the correct NUMA node

2015-05-28 Thread K. Y. Srinivasan
Allocate the receive bufer from the NUMA node assigned to the primary channel. Signed-off-by: K. Y. Srinivasan --- drivers/net/hyperv/netvsc.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index b024968..d

[PATCH] staging: wilc1000 dead code removal

2015-05-28 Thread Arnd Bergmann
Subject: [PATCH] staging: wilc1000 dead code removal After finding some build errors in wilc1000, I played some more with the driver and eliminated a lot of unused code. This is all code meant for OS abstraction. Since we know we are running Linux, and which version we use, it can all be removed.

[PATCH REPOST] staging: xgifb: use arch_phys_wc_add() and ioremap_wc()

2015-05-28 Thread Luis R. Rodriguez
guez --- Greg, this is a respost from my March 20th submission which seems to have fallen through the cracks likely due to me not directing it to you. Apologies for that. This repost goes unchanged and is rebased on top of linux-next next-20150528. drivers/staging/xgifb/XGI_main_26.c | 2

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread insop.s...@gainspeed.com
On Thu, May 28, 2015 at 09:50:23PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 09:39:14AM -0700, insop.s...@gainspeed.com wrote: > > On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: > > > On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath > > > (H.) wrot

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 09:39:14AM -0700, insop.s...@gainspeed.com wrote: > On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: > > On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath (H.) > > wrote: > > > remove redundant code in this function by introducing a new re

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread insop.s...@gainspeed.com
On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > remove redundant code in this function by introducing a new retval > > variable. > > > > Signed-off-by: Gujulan Elango Hari Prasath > > No th

Re: [oss-security] Re: [PATCH v2 4/4] ozwpan: unchecked signed subtraction leads to DoS

2015-05-28 Thread Greg Kroah-Hartman
On Thu, May 28, 2015 at 05:37:59PM +0200, Jason A. Donenfeld wrote: > On Thu, May 28, 2015 at 1:04 PM, Dan Carpenter > wrote: > > It's really not simpler to understand though. > > Greg - do you want me to resubmit a v3 for this, or does it not really > matter and we can address this in another s

Re: [PATCH] staging: gdm72xx: remove unneeded test

2015-05-28 Thread Joe Perches
On Thu, 2015-05-28 at 18:21 +0200, Julia Lawall wrote: > > On Wed, 27 May 2015, Joe Perches wrote: > > > On Thu, 2015-05-28 at 07:43 +0200, Julia Lawall wrote: > > > On Wed, 27 May 2015, Joe Perches wrote: > > > > Perhaps all of the uses like: > > > > > > > > goto ; > > > > : > > > > > >

Re: [PATCH] staging: ft1000: warning removal: extern functions to static ones

2015-05-28 Thread Greg KH
On Thu, May 28, 2015 at 05:24:56PM +0200, Xavier Roche wrote: > Local functions not used in other modules should be static, not extern. > (patch checked against linux-next and staging) This line shouldn't be here, it should just be "implied" :) > Signed-off-by: Xavier Roche > --- > drivers/stag

Re: [PATCH] staging: gdm72xx: remove unneeded test

2015-05-28 Thread Julia Lawall
On Wed, 27 May 2015, Joe Perches wrote: > On Thu, 2015-05-28 at 07:43 +0200, Julia Lawall wrote: > > On Wed, 27 May 2015, Joe Perches wrote: > > > Perhaps all of the uses like: > > > > > > goto ; > > > : > > > > > > could be modified. There are ~150 in the kernel. > > > > I wrote a semantic p

[PATCH] Drivers: hv: vmbus: use 'die' notification chain instead of 'panic'

2015-05-28 Thread Vitaly Kuznetsov
current_pt_regs() returns regs of the userspace process and in case of kernel crash this is not what we need to report. E.g. when we trigger crash with sysrq we see the following: ... RIP: 0010:[] [] sysrq_handle_crash+0x16/0x20 RSP: 0018:8800db0a7d88 EFLAGS: 00010246 RAX: 000

[PATCH] staging: ft1000: warning removal: extern functions to static ones

2015-05-28 Thread Xavier Roche
Local functions not used in other modules should be static, not extern. (patch checked against linux-next and staging) Signed-off-by: Xavier Roche --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c | 24 +++--- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/d

Re: [oss-security] Re: [PATCH v2 4/4] ozwpan: unchecked signed subtraction leads to DoS

2015-05-28 Thread Jason A. Donenfeld
On Thu, May 28, 2015 at 1:04 PM, Dan Carpenter wrote: > It's really not simpler to understand though. Greg - do you want me to resubmit a v3 for this, or does it not really matter and we can address this in another series? Personally, I'm erring on the side of wanting to get *something* merged so

Re: [PATCH] staging/wilc1000: fix Kconfig dependencies

2015-05-28 Thread Nicolas Ferre
Le 28/05/2015 16:35, Arnd Bergmann a écrit : > The newly added wilc1000 driver lacks several Kconfig dependencies, > resulting in a multitude of randconfig build errors, e.g.: > > drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait': > binder.c:(.text+0x12bd28): undefined reference to >

[PATCH] staging: wilc1000: off by one in wilc_wfi_cfg80211_mgmt_types

2015-05-28 Thread Sasha Levin
NL80211_IFTYPE_MAX represents the largest interface type number defined, so declaring the array with that size will actually leave out the last interface. This causes invalid memory access whenever this array is used, which starts happening at boot. Signed-off-by: Sasha Levin --- drivers/stagin

[PATCH] staging/wilc1000: fix Kconfig dependencies

2015-05-28 Thread Arnd Bergmann
The newly added wilc1000 driver lacks several Kconfig dependencies, resulting in a multitude of randconfig build errors, e.g.: drivers/built-in.o: In function `WILC_WFI_mgmt_tx_cancel_wait': binder.c:(.text+0x12bd28): undefined reference to `cfg80211_remain_on_channel_expired' drivers/built-in.o:

Re: [PATCH net-next 1/1] hv_netvsc: Properly size the vrss queues

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 01:52:47PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Thursday, May 28, 2015 12:06 AM > > To: KY Srinivasan > > Cc: da...@davemloft.net; net...@vger.kernel.org; linux- > > ker...@vger.k

RE: [PATCH net-next 1/1] hv_netvsc: Properly size the vrss queues

2015-05-28 Thread KY Srinivasan
> -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Thursday, May 28, 2015 12:06 AM > To: KY Srinivasan > Cc: da...@davemloft.net; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canonical.com;

Re: [PATCH] staging: dgnc: check return value of kzalloc

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 01:23:57PM +, Gujulan Elango, Hari Prasath (H.) wrote: > Check the return value of kzalloc & return error if it fails. > > Signed-off-by: Gujulan Elango Hari Prasath > --- > drivers/staging/dgnc/dgnc_driver.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

[PATCH] staging: dgnc: check return value of kzalloc

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
Check the return value of kzalloc & return error if it fails. Signed-off-by: Gujulan Elango Hari Prasath --- drivers/staging/dgnc/dgnc_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 935e297..2c729be 10

Re: [PATCHv3] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 12:08:56PM +, Gujulan Elango, Hari Prasath (H.) wrote: > remove redundant code in this function.remove return value check for > function that always return success > > Signed-off-by: Gujulan Elango Hari Prasath Looks good. Thanks! regards, dan carpenter __

[PATCH] staging: dgnc: check return value before using pointer

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
Check the return value of kcalloc first and then use the pointer. Signed-off-by: Gujulan Elango Hari Prasath --- drivers/staging/dgnc/dgnc_driver.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c

[PATCHv3] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
remove redundant code in this function.remove return value check for function that always return success Signed-off-by: Gujulan Elango Hari Prasath --- v3:Remove initialization of the 'err' variable. v2:address review comments from Dan.Remove return value check for the fu

[PATCHv3 13/16] staging: vme_user: remove open/release

2015-05-28 Thread Dmitry Kalinkin
Checking for image[minor].resource != NULL is not needed since all resources are allocated before device is created. image[minor].users accounting is deleted because it's not being used. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 44 --

[PATCHv3 15/16] vme: tsi148: depend on HAS_DMA for Kconfig

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vme/bridges/Kconfig b/drivers/vme/bridges/Kconfig index 9331064..f6d8545 100644 --- a/drivers/vme/bridges/Kconfig +++ b/drivers/vme/bridges

[PATCHv3 16/16] vme: provide uapi header

2015-05-28 Thread Dmitry Kalinkin
This separates VME related constants that are a part of both kernel and user space API into a common uapi header. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- include/linux/vme.h | 54 ++--- include/uapi/linux/Kbuild | 1 + include/uapi/lin

[PATCHv3 05/16] staging: vme_user: refactor llseek to switch(){}

2015-05-28 Thread Dmitry Kalinkin
This makes vme_user_llseek ignore all minors that don't have llseek implementation. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vme/devices/vme

[PATCHv3 14/16] staging: vme_user: remove buf_unalloc helper

2015-05-28 Thread Dmitry Kalinkin
buf_unalloc is essentially a vme_free_consistent: 1) image[i].kern_buf is never NULL in buf_alloc call 2) kern_buf, pci_buf and size_buf get zeroed in vme_user_probe anyway Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 31 -

[PATCHv3 11/16] staging: vme_user: remove unused counters

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index e8a1ca6..cc0d3df 100644 --- a/dri

[PATCHv3 03/16] vme: tsi148: fix first DMA item mapping

2015-05-28 Thread Dmitry Kalinkin
This moves DMA mapping of the first list element to vme_list_add, the same place where other elements mappings occur. This prevents extra mapping or over-unmapping in the cases when vme_list_exec is called more or less than one time respectively. Also adds dma_mapping_error check. Signed-off-by:

[PATCHv3 09/16] vme: ca91cx42: return error code on DMA error

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_ca91cx42.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index e9bd657..f692efc 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/driver

[PATCHv3 12/16] staging: vme_user: remove forward declarations

2015-05-28 Thread Dmitry Kalinkin
Reorder code so that forward declarations are not needed. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 139 ++--- 1 file changed, 60 insertions(+), 79 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c

[PATCHv3 06/16] vme: check for A64 overflow in vme_check_window()

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/vme.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 6bab2c4..1b78d27 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -199,10 +199,8 @@ static int vme

[PATCHv3 04/16] vme: stop DMA transfer on interruption

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_ca91cx42.c | 17 ++--- drivers/vme/bridges/vme_tsi148.c | 15 +-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_c

[PATCHv3 02/16] vme: tsi148: fix DMA lists longer that one item

2015-05-28 Thread Dmitry Kalinkin
DMA lists on tsi148 weren't processed further than the first item because of the broken logic. This regression was introduced in: ac1a4f2caf7b071 "Staging: VME: Ensure TSI148 link list descriptors..." Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_tsi148.c | 4 ++-

[PATCHv3 10/16] vme: ca91cx42: fix LM_CTL address mask

2015-05-28 Thread Dmitry Kalinkin
Universe II datasheet defines following address space values for LM_CTL[16:18] 000=A16 001=A24 010=A32 011,100,101=Reserved 110=User1 111=User2 Mask 5<<16 is not the right one for matching [16:18], instead we should use 7<<16. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev Reported-by: Dan C

[PATCHv3 08/16] staging: vme_user: provide DMA functionality

2015-05-28 Thread Dmitry Kalinkin
This introduces a new dma device that provides a single ioctl call that provides DMA read and write functionality to the user space. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 201 - drivers/staging/vme/devices/v

[PATCHv3 07/16] vme: export vme_check_window()

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/vme.c | 5 +++-- include/linux/vme.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 1b78d27..5670891 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -1

[PATCHv3 01/16] Documentation: mention vme_master_mmap() in VME API

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- Documentation/vme_api.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/vme_api.txt b/Documentation/vme_api.txt index ffe6e22..ca5b827 100644 --- a/Documentation/vme_api.txt +++ b/Documentation/vme_api.txt @@ -171,6 +

[PATCHv3 00/16] vme DMA and user space driver improvements

2015-05-28 Thread Dmitry Kalinkin
The first item in this submission documents previously introduced vme_master_mmap() call. Following, there are three fixes for the tsi148 driver's DMA. There was one bug that rendered it imposible to use DMA lists with more than one item. The other was related to the place where dma_map_single was

Re: [PATCHv2] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 02:37:43PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 11:32:21AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > The reason i did that was if the function doesn't hit any error > > condition, then it needs to return 0. If the err variable is not > > initial

Re: [PATCHv2] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 11:32:21AM +, Gujulan Elango, Hari Prasath (H.) wrote: > The reason i did that was if the function doesn't hit any error > condition, then it needs to return 0. If the err variable is not > initialized to 0,I assume that it can take any value.Please correct me > if i am

Re: [PATCHv2] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 02:07:36PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 10:51:38AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > remove redundant code in this function.remove return value check for > > function that always return success. > > > > Signed-off-by: Gujulan El

Re: [PATCHv2] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 10:51:38AM +, Gujulan Elango, Hari Prasath (H.) wrote: > remove redundant code in this function.remove return value check for > function that always return success. > > Signed-off-by: Gujulan Elango Hari Prasath > --- > v2:address review comments from Dan.Remove

Re: [oss-security] Re: [PATCH v2 4/4] ozwpan: unchecked signed subtraction leads to DoS

2015-05-28 Thread Dan Carpenter
On Tue, May 26, 2015 at 04:34:55PM +0200, Jason A. Donenfeld wrote: > On Tue, May 26, 2015 at 4:06 PM, Dan Carpenter > wrote: > > You sure do like wrapping to a high value and testing the result for > > wrapping instead of validating before doing the subtraction... > > I do indeed. It seems like

[PATCHv2] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
remove redundant code in this function.remove return value check for function that always return success. Signed-off-by: Gujulan Elango Hari Prasath --- v2:address review comments from Dan.Remove return value check for the function gs_release_image as it always returns success and rearran

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 10:19:40AM +, Gujulan Elango, Hari Prasath (H.) wrote: > > > fimage = kmalloc(sizeof(struct fpgaimage), GFP_KERNEL); > > > if (!fimage) > > > @@ -298,44 +299,41 @@ static int gs_fpgaboot(void) > > > err = gs_load_image(fimage, file); > > > if (err) { > > > >

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 01:08:36PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > remove redundant code in this function by introducing a new retval > > variable. > > > > Signed-off-by: Gujulan Elango Hari Prasath > > No th

Re: [PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 09:38:23AM +, Gujulan Elango, Hari Prasath (H.) wrote: > remove redundant code in this function by introducing a new retval > variable. > > Signed-off-by: Gujulan Elango Hari Prasath No the original code is quite bad but this patch makes it worse. gs_release_image()

[PATCH] staging: gs_fpgaboot: remove redundant code

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
remove redundant code in this function by introducing a new retval variable. Signed-off-by: Gujulan Elango Hari Prasath --- drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c

[PATCHv2 12/16] staging: vme_user: remove forward declarations

2015-05-28 Thread Dmitry Kalinkin
Reorder code so that forward declarations are not needed. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 139 ++--- 1 file changed, 60 insertions(+), 79 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c

[PATCHv2 16/16] vme: provide uapi header

2015-05-28 Thread Dmitry Kalinkin
This separates VME related constants that are a part of both kernel and user space API into a common uapi header. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- include/linux/vme.h | 54 ++--- include/uapi/linux/Kbuild | 1 + include/uapi/lin

[PATCHv2 15/16] vme: tsi148: depend on HAS_DMA for Kconfig

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vme/bridges/Kconfig b/drivers/vme/bridges/Kconfig index 9331064..f6d8545 100644 --- a/drivers/vme/bridges/Kconfig +++ b/drivers/vme/bridges

[PATCHv2 14/16] staging: vme_user: remove buf_unalloc helper

2015-05-28 Thread Dmitry Kalinkin
buf_unalloc is essentially a vme_free_consistent: 1) image[i].kern_buf is never NULL in buf_alloc call 2) kern_buf, pci_buf and size_buf get zeroed in vme_user_probe anyway Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 31 -

[PATCHv2 13/16] staging: vme_user: remove open/release

2015-05-28 Thread Dmitry Kalinkin
Checking for image[minor].resource != NULL is not needed since all resources are allocated before device is created. image[minor].users accounting is deleted because it's not being used. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 44 --

[PATCHv2 09/16] vme: ca91cx42: return error code on DMA error

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_ca91cx42.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index e9bd657..f692efc 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/driver

[PATCHv2 04/16] vme: stop DMA transfer on interruption

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_ca91cx42.c | 17 ++--- drivers/vme/bridges/vme_tsi148.c | 15 +-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_c

[PATCHv2 10/16] vme: ca91cx42: fix LM_CTL address mask

2015-05-28 Thread Dmitry Kalinkin
Universe II datasheet defines following address space values for LM_CTL[16:18] 000=A16 001=A24 010=A32 011,100,101=Reserved 110=User1 111=User2 Mask 5<<16 is not the right one for matching [16:18], instead we should use 7<<16. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev Reported-by: Dan C

[PATCHv2 02/16] vme: tsi148: fix DMA lists longer that one item

2015-05-28 Thread Dmitry Kalinkin
DMA lists on tsi148 weren't processed further than the first item because of the broken logic. This regression was introduced in: ac1a4f2caf7b071 "Staging: VME: Ensure TSI148 link list descriptors..." Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/bridges/vme_tsi148.c | 4 ++-

[PATCHv2 11/16] staging: vme_user: remove unused counters

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 31 --- 1 file changed, 31 deletions(-) diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index ca7ea6b..ed374d9 100644 --- a/dri

[PATCHv2 05/16] staging: vme_user: refactor llseek to switch(){}

2015-05-28 Thread Dmitry Kalinkin
This makes vme_user_llseek ignore all minors that don't have llseek implementation. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vme/devices/vme

[PATCHv2 07/16] vme: export vme_check_window()

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/vme.c | 5 +++-- include/linux/vme.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 1b78d27..5670891 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -1

[PATCHv2 08/16] staging: vme_user: provide DMA functionality

2015-05-28 Thread Dmitry Kalinkin
This introduces a new dma device that provides a single ioctl call that provides DMA read and write functionality to the user space. Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/staging/vme/devices/vme_user.c | 201 - drivers/staging/vme/devices/v

[PATCHv2 03/16] vme: tsi148: fix first DMA item mapping

2015-05-28 Thread Dmitry Kalinkin
This moves DMA mapping of the first list element to vme_list_add, the same place where other elements mappings occur. This prevents extra mapping or over-unmapping in the cases when vme_list_exec is called more or less than one time respectively. Also adds dma_mapping_error check. Signed-off-by:

[PATCHv2 06/16] vme: check for A64 overflow in vme_check_window()

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- drivers/vme/vme.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 6bab2c4..1b78d27 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -199,10 +199,8 @@ static int vme

[PATCHv2 00/16] vme DMA and user space driver improvements

2015-05-28 Thread Dmitry Kalinkin
The first item in this submission documents previously introduced vme_master_mmap() call. Following, there are three fixes for the tsi148 driver's DMA. There was one bug that rendered it imposible to use DMA lists with more than one item. The other was related to the place where dma_map_single was

[PATCHv2 01/16] Documentation: mention vme_master_mmap() in VME API

2015-05-28 Thread Dmitry Kalinkin
Signed-off-by: Dmitry Kalinkin Cc: Igor Alekseev --- Documentation/vme_api.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/vme_api.txt b/Documentation/vme_api.txt index ffe6e22..ca5b827 100644 --- a/Documentation/vme_api.txt +++ b/Documentation/vme_api.txt @@ -171,6 +

[PATCH v3] staging: lustre: fix non-static symbol warnings reported by sparse

2015-05-28 Thread Marcus Folkesson
Warnings reported by sparse: drivers/staging/lustre/lustre/ptlrpc/pinger.c:94:5: warning: symbol 'ptlrpc_ping' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/pinger.c:113:6: warning: symbol 'ptlrpc_update_next_ping' was not declared. Should it be static drivers/stagi

Re: [PATCHv2] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 11:57:54AM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 08:54:12AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > > > I resend v3 but it seems there is a duplicate signature.Please dicard it > > as well.I am sending v4 now. > > v3 is fine. The duplicate s

[PATCHv3] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
The sm750fb driver has few Framebuffer configuration dependencies that need to be selected in order to get compiled successfully Signed-off-by: Gujulan Elango Hari Prasath --- v3: Fix alignment issues addressed by Dan Carpenter. v2:Addressed the review comments by Sudhip Mukherje

Re: [PATCHv2] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 08:54:12AM +, Gujulan Elango, Hari Prasath (H.) wrote: > > I resend v3 but it seems there is a duplicate signature.Please dicard it > as well.I am sending v4 now. v3 is fine. The duplicate sign-off is below the cut off line --- so it will be removed automatically. r

Re: [PATCHv2] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
On Thu, May 28, 2015 at 11:45:28AM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 08:40:41AM +, Gujulan Elango, Hari Prasath (H.) > wrote: > > diff --git a/drivers/staging/sm750fb/Kconfig > > b/drivers/staging/sm750fb/Kconfig > > index c40d088..59d7c52 100644 > > --- a/drivers/staging/

[PATCHv3] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Gujulan Elango, Hari Prasath (H.)
The sm750fb driver has few Framebuffer configuration dependencies that need to be selected in order to get compiled successfully. Signed-off-by: Gujulan Elango Hari Prasath --- v3: Fix alignment issues addressed by Dan Carpenter. v2:Addressed the review comments by Sudhip Mukherj

Re: [PATCHv2] staging: sm750fb: Add missing Kconfig dependency

2015-05-28 Thread Dan Carpenter
On Thu, May 28, 2015 at 08:40:41AM +, Gujulan Elango, Hari Prasath (H.) wrote: > diff --git a/drivers/staging/sm750fb/Kconfig b/drivers/staging/sm750fb/Kconfig > index c40d088..59d7c52 100644 > --- a/drivers/staging/sm750fb/Kconfig > +++ b/drivers/staging/sm750fb/Kconfig > @@ -1,6 +1,10 @@ >

Re: [PATCH] staging: gdm72xx: remove unneeded test

2015-05-28 Thread Joe Perches
On Thu, 2015-05-28 at 10:14 +0300, Dan Carpenter wrote: > On Wed, May 27, 2015 at 01:30:08PM -0700, Joe Perches wrote: > > Perhaps all of the uses like: > > goto ; > > : > > > > could be modified. There are ~150 in the kernel. > > Joe, these are a kind of style. You're just directing a newb

Re: [PATCH] staging: gdm72xx: remove unneeded test

2015-05-28 Thread Joe Perches
On Thu, 2015-05-28 at 10:33 +0200, Julia Lawall wrote: > On Thu, 28 May 2015, Joe Perches wrote: > I think these are very equivalent style to > > the repeated: > > > > ret = foo(); > > if (ret < 0) > > return ret; > > ... > > ret = bar(); > > if (ret < 0) > >

  1   2   >