Re: [PATCH v4 1/2] staging: vt6655: check for memory allocation failures

2018-03-31 Thread Jia-Ju Bai
On 2018/3/30 13:51, Ji-Hun Kim wrote: There are no null pointer checking on rd_info and td_info values which are allocated by kzalloc. It has potential null pointer dereferencing issues. Implement error handling code on device_init_rd*, device_init_td* and vnt_start for the allocation failures.

Re: [PATCH net-next] hv_netvsc: Clean up extra parameter from rndis_filter_receive_data()

2018-03-31 Thread David Miller
From: Haiyang Zhang Date: Fri, 30 Mar 2018 13:57:59 -0700 > From: Haiyang Zhang > > The variables, msg and data, have the same value. This patch removes > the extra one. > > Signed-off-by: Haiyang Zhang Applied. ___ devel mailing list de...@linuxdr

Re: [PATCH 04/11] staging: vchiq_arm: Clear VLA warning

2018-03-31 Thread kbuild test robot
Hi Stefan, I love your patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.16-rc7 next-20180329] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0d

[PATCH 11/11] staging: vchiq_core: Free kthreads in error case

2018-03-31 Thread Stefan Wahren
We need to free the kthreads in error case before leaving vchiq_init_state() otherwise we leak resources. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 09/11] staging: vchiq_arm: Avoid long udelay

2018-03-31 Thread Stefan Wahren
vchiq_initialise() is used in non-interrupt context, so we can replace udelay with usleep_range as suggested by timers-howto.txt. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH 06/11] staging: vchiq_arm: Make index variable more self-explaining

2018-03-31 Thread Stefan Wahren
The chance to mixup i and j is very high. So rename variable j to a more explaining one. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vc04_services/in

[PATCH 05/11] staging: vchiq_arm: Rework second abort criterion

2018-03-31 Thread Stefan Wahren
In order to make the code easier to review, move the second abort criterion into the loop and the incrementation into a separate line. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH 01/11] staging: vchiq_core: Fix missing semaphore release in error case

2018-03-31 Thread Stefan Wahren
The bail out branch in case of a invalid tx_pos missed a semaphore release. Dan Carpenter found this with a static checker. Fixes: d1eab9dec610 ("staging: vchiq_core: Bail out in case of invalid tx_pos") Reported-by: Dan Carpenter Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/i

[PATCH 02/11] staging: vchiq_core: Remove stackhog in process_free_queue

2018-03-31 Thread Stefan Wahren
This removes the stackhog in process_free_queue by allocating the necessary memory within the recycle thread main function instead of the stack. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 16 1 file changed, 12 insertions(+), 4 de

[PATCH 08/11] staging: vchiq_arm: Fix multiline dereferences

2018-03-31 Thread Stefan Wahren
Multiline dereferences aren't nice to review. So fix this checkpatch warning. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vch

[PATCH 10/11] staging: vchiq_core: Move all wake-ups to one point

2018-03-31 Thread Stefan Wahren
Move all calls of wake_up_process to one point, whichs makes the following implementation of clean-up code easier. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/stag

[PATCH 04/11] staging: vchiq_arm: Clear VLA warning

2018-03-31 Thread Stefan Wahren
The kernel would like to have all stack VLA usage removed[1]. The array here is fixed (declared with a const variable) but it appears like a VLA to the compiler. Also, currently we are putting 768 bytes on the stack. So save stack space and removes the VLA build warning by making it static. [1]: h

[PATCH 07/11] staging: vc04_services: Use __func__ macro

2018-03-31 Thread Stefan Wahren
It's better to use the __func__ macro instead of open-code the function name. This fixes the following checkpatch warning: WARNING: Prefer using '"%s...", __func__' to using 'x', this function's name, in a string Signed-off-by: Stefan Wahren --- .../interface/vchiq_arm/vchiq_2835_arm.c

[PATCH 03/11] staging: vchiq_core: remove BITSET_ZERO

2018-03-31 Thread Stefan Wahren
Hiding memset behind a macro isn't the best, because it relies on that the parameter is not a pointer. Luckily all user has been removed, so we can remove BITSET_ZERO too. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 1 - 1 file changed, 1 del

Re: [PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Joe Perches
On Sat, 2018-03-31 at 11:41 +0300, Dan Carpenter wrote: > On Fri, Mar 30, 2018 at 11:36:13PM -0700, Joe Perches wrote: > > On Fri, 2018-03-30 at 23:07 -0700, Quytelda Kahja wrote: > > > This macro, provided in 'linux/kernel.h', will calculate the size > > > more succinctly than a division operation

Re: [PATCH] Patch to replace DEFINE_SEMAPHORE with DEFINE_BINARY_SEMAPHORE

2018-03-31 Thread Greg Kroah-Hartman
On Sat, Mar 31, 2018 at 07:16:21PM +0530, Wasim Nazir wrote: > This message contains confidential information and is intended only for the > individual(s) named. If you are not the intended recipient, you are > notified that disclosing, copying, distributing or taking any action in > reliance on

Re: [PATCH v2 68/75] staging: ks7010: Replace manual array copy with ether_addr_copy().

2018-03-31 Thread Dan Carpenter
I'm in a hurry because I'm leaving for a long weekend so I've reviewed the first easy 67 patches but this one is tricky and I'm not able to review it properly before I leave. On Fri, Mar 30, 2018 at 11:08:48PM -0700, Quytelda Kahja wrote: > Copying the dummy HW address into the struct net_device d

Re: [PATCH v2 71/75] staging: ks7010: Remove dummy address set.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:08:51PM -0700, Quytelda Kahja wrote: > Setting a dummy address during the driver probe is not necessary. > The dev_addr field is already zeroed out from alloc_etherdev(). > > Signed-off-by: Quytelda Kahja > --- > drivers/staging/ks7010/ks_wlan_net.c | 6 -- > 1 fil

Re: [PATCH v2 69/75] staging: ks7010: Remove extra blank line between functions.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:08:49PM -0700, Quytelda Kahja wrote: > Remove an extra blank line indicated by checkpatch. > > Signed-off-by: Quytelda Kahja > --- > drivers/staging/ks7010/ks7010_sdio.c | 3 ++- > drivers/staging/ks7010/ks_hostif.c | 1 - > 2 files changed, 2 insertions(+), 2 deleti

Re: [PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:36:13PM -0700, Joe Perches wrote: > On Fri, 2018-03-30 at 23:07 -0700, Quytelda Kahja wrote: > > This macro, provided in 'linux/kernel.h', will calculate the size > > more succinctly than a division operation. > > It's nice that you send patches, but please try to send a

Re: [PATCH v4 07/13] staging: typec: tcpci: register port before request irq

2018-03-31 Thread Dan Carpenter
On Sat, Mar 31, 2018 at 03:09:44AM +, Jun Li wrote: > This patch is to change the sequence of register port and request irq, > if error code checking of original code has the problem, I think that > should be another patch to fix it, I can do that later. Fair enough. That's reasonable. Thank