Re: [PATCH 01/25] tty: Change return type to void

2018-09-04 Thread Jiri Slaby
On 09/05/2018, 03:08 AM, Jaejoong Kim wrote: > > @@ -688,7 +688,7 @@ extern int tty_port_close_start(struct > tty_port *port, > >   extern void tty_port_close_end(struct tty_port *port, struct > tty_struct *tty); > >   extern void tty_port_close(struct tty_port *port, > >   

[PATCH v3] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-09-04 Thread Alexey Skidanov
ION had supported heap debug info under /sys/kernel/debug/ion/. This support have been removed but some leftovers (dead code) still exist. This patch removes the existing dead code. Fixes: 15c6098cfec5 ("staging: android: ion: Remove ion_handle and ion_client") Signed-off-by: Alexey Skidanov

[PATCH v2] tty: Change tty_{port|standard}_install() return type to void

2018-09-04 Thread Jaejoong Kim
Many drivers with tty use the tty_stand_install(). But, there is no need to handle the error, since it always returns 0. So, change the return type of tty_standard_install() and tty_port_install() to void type and remove unnecessary exception handling where we use these functions. Signed-off-by:

Re: [PATCH v2] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-09-04 Thread Alexey Skidanov
On 09/04/2018 09:23 PM, Laura Abbott wrote: > On 08/26/2018 01:08 PM, Alexey Skidanov wrote: >> ION had supported heap debug info under >> /sys/kernel/debug/ion/. >> This support have been removed but some leftovers (dead code) still >> exist. >> >> This patch removes the existing dead code. >>

Re: [PATCH v2] staging: android: ion: fix ION_IOC_{MAP,SHARE} use-after-free

2018-09-04 Thread Laura Abbott
On 09/04/2018 09:33 AM, Greg Hackmann wrote: The ION_IOC_{MAP,SHARE} ioctls drop and reacquire client->lock several times while operating on one of the client's ion_handles. This creates windows where userspace can call ION_IOC_FREE on the same client with the same handle, and effectively make

Re: [PATCH v2] staging: android: ion: Clean unused debug_show memeber of the heap object

2018-09-04 Thread Laura Abbott
On 08/26/2018 01:08 PM, Alexey Skidanov wrote: ION had supported heap debug info under /sys/kernel/debug/ion/. This support have been removed but some leftovers (dead code) still exist. This patch removes the existing dead code. This was actually an unintended side effect. The goal was to

[PATCH v2] staging: android: ion: fix ION_IOC_{MAP, SHARE} use-after-free

2018-09-04 Thread Greg Hackmann
The ION_IOC_{MAP,SHARE} ioctls drop and reacquire client->lock several times while operating on one of the client's ion_handles. This creates windows where userspace can call ION_IOC_FREE on the same client with the same handle, and effectively make the kernel drop its own reference. For example:

[PATCH] tools: hv: fcopy: set 'error' in case an unknown operation was requested

2018-09-04 Thread Vitaly Kuznetsov
'error' variable is left uninitialized in case we see an unknown operation. As we don't immediately return and proceed to pwrite() we need to set it to something, HV_E_FAIL sounds good enough. Signed-off-by: Vitaly Kuznetsov --- tools/hv/hv_fcopy_daemon.c | 1 + 1 file changed, 1 insertion(+)

[PATCH] staging: most: net: make array 'broadcast' static, shrinks object size

2018-09-04 Thread Colin King
From: Colin Ian King Don't populate the array 'broadcast' on the stack but instead make it static. Makes the object code smaller by 53 bytes: Before: textdata bss dec hex filename 105111521 448 1248030c0 drivers/staging/most/net/net.o After: textdata

Re: [PATCH v7 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-04 Thread kbuild test robot
Hi Janusz, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on gpio/for-next] [also build test WARNING on v4.19-rc2 next-20180831] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v6 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-04 Thread kbuild test robot
Hi Janusz, Thank you for the patch! Yet something to improve: [auto build test ERROR on gpio/for-next] [also build test ERROR on v4.19-rc2 next-20180831] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v6 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-04 Thread kbuild test robot
Hi Janusz, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on gpio/for-next] [also build test WARNING on v4.19-rc2 next-20180831] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v6 3/4] gpiolib: Pass array info to get/set array functions

2018-09-04 Thread kbuild test robot
Hi Janusz, Thank you for the patch! Yet something to improve: [auto build test ERROR on gpio/for-next] [also build test ERROR on v4.19-rc2 next-20180831] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v7 3/4] gpiolib: Pass array info to get/set array functions

2018-09-04 Thread kbuild test robot
Hi Janusz, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on gpio/for-next] [also build test WARNING on v4.19-rc2 next-20180831] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

yield() and cond_resched() do not yield to another thread

2018-09-04 Thread fei phung
Hi everyone, I am working on https://github.com/promach/riffa/tree/full_duplex While I modifying the linux driver, I faced some issue using yield(). Why riffa_driver.c yield() function https://gist.github.com/promach/7716ee8addcaa33fda140d74d1ad94d6#file-riffa_driver-c-L746 does not yield to

[PATCH 2/2] staging: rtl8188eu: remove unnecessary parentheses in rtw_led.c

2018-09-04 Thread Michael Straube
Remove unnecessary parentheses from conditionals. Also clears 'Alignment should match open parenthesis' checkpatch issue. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 0/1] staging:rtl8192u: Fix naming clash of exported symbol

2018-09-04 Thread John Whitmore
Not sure of the procedure having made a mess of the build, (by reusing the name of an exported symbol). I hope that given the obscurity of rtl1892u this doesn't cause people issues. Obviously given the fact that I renamed an exported symbol I should have checked the name. Newbie mistake, I can

Re: [PATCH 01/25] tty: Change return type to void

2018-09-04 Thread Sergei Shtylyov
Hello! On 9/4/2018 5:44 AM, Jaejoong Kim wrote: Many drivers with tty use the tty_stand_install(). But, there is no need to handle the error, since it always returns 0. So, change the return type of tty_standard_install() and tty_port_install() to void type and remove unnecessary exception

[PATCH v2 25/26] staging: wilc1000: refactor wilc_netdev_init() to handle memory free in error path

2018-09-04 Thread Ajay Singh
Refactor the wilc_netdev_init() to cleanup the memory for error scenario and remove unnecessary 'dev' pointer check. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 36 --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++- 2 files

[PATCH v2 26/26] staging: wilc1000: remove handle_hif_exit_work() function

2018-09-04 Thread Ajay Singh
Cleanup to remove handle_hif_exit_work(), as after code refactoring its not required anymore. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH v2 24/26] staging: wilc1000: refactor code to move initilization in wilc_netdev_init()

2018-09-04 Thread Ajay Singh
Refactor code to move the initialization of wilc related parameters in wilc_netdev_init() and move their deinitialization in wilc_netdev_cleanup(). For 'hif_workqueue' creation 'clients_count' check is not required as the single instance is maintained. Signed-off-by: Ajay Singh ---

[PATCH v2 14/26] staging: wilc1000: move 'rcv_assoc_resp' as part of hif_drv

2018-09-04 Thread Ajay Singh
Avoid use of static variable and move 'rcv_assoc_resp' as part of 'hif_drv' struct. Rename from 'rcv_assoc_resp' to 'assoc_resp'. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 +++- drivers/staging/wilc1000/host_interface.h | 1 + 2 files changed, 4

[PATCH v2 23/26] staging: wilc1000: remove unnecessary static variable 'p2p_listen_state'

2018-09-04 Thread Ajay Singh
Remove the use of unnecessary static variable 'p2p_listen_state'. Already 'p2p_listen_state' is present in 'wilc_priv' struct. So making use of that variable as its getting set in channel ready and remain on channel expired callback. Signed-off-by: Ajay Singh ---

[PATCH v2 22/26] staging: wilc1000: move 'wilc_connecting' static variable to 'wilc_vif' struct

2018-09-04 Thread Ajay Singh
Move static variable 'wilc_connecting' as part of 'wilc_vif' private struct. Remove "wilc_" prefix from name as its already part of wilc_vif struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 4 ++-- drivers/staging/wilc1000/host_interface.h | 2

[PATCH v2 07/26] staging: wilc1000: remove unused variable 'op_ifcs'

2018-09-04 Thread Ajay Singh
After code refactor in previous commit now 'op_ifcs' is not require any more, so remove it. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

[PATCH v2 16/26] staging: wilc1000: use lowercase for get_BSSID() and HIL variable

2018-09-04 Thread Ajay Singh
Cleanup patch to use lowercase name for get_BSSID() and HIL variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c| 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH v2 21/26] staging: wilc1000: move 'chip_ps_state' static variable as part of 'wilc' struct

2018-09-04 Thread Ajay Singh
Move the static variable as part of 'wilc' priv struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 1 + drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + drivers/staging/wilc1000/wilc_wlan.c | 10 -- 3 files changed, 6 insertions(+), 6

[PATCH v2 08/26] staging: wilc1000: avoid use of extra 'if' condition in wilc_init()

2018-09-04 Thread Ajay Singh
Cleanup patch to avoid the avoid extra 'if' condition and clubbed the same condition in single 'if' block. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH v2 11/26] staging: wilc1000: move hif_workqueue static variables to 'wilc' structure

2018-09-04 Thread Ajay Singh
Avoid use of static variable hif_workqueue and move it inside 'wilc' structure. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 13 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git

[PATCH v2 15/26] staging: wilc1000: refactor tcp_process() to avoid extra leading tabs

2018-09-04 Thread Ajay Singh
Refactor tcp_process() to avoid unnecessary leading tabs in the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 52 +++- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c

[PATCH v2 12/26] staging: wilc1000: move 'periodic_rssi' as part of 'wilc_vif' struct

2018-09-04 Thread Ajay Singh
Refactor code to move 'periodic_rssi' as part of wilc_vif struct. Move 'dummy_statistics' from 'wilc' struct to 'wilc_vif' to maintain for each interface separately. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 19 ---

[PATCH v2 05/26] staging: wilc1000: moved last_scanned_shadow & last_scanned_cnt to wilc_priv struct

2018-09-04 Thread Ajay Singh
Avoid use of static variables and moved the varibles as part of private data. last_scanned_shadow & last_scanned_cnt variable is moved to 'wilc_priv' to maintain for each interface. After moving static variable, clear_shadow_scan() doesn't require check 'op_ifcs' count as now for each interface

[PATCH v2 20/26] staging: wilc1000: remove unused code to set and get IP address

2018-09-04 Thread Ajay Singh
Cleanup code to remove the variables related to setting and getting IP address as this case was not handled from firmware side. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 105 -- drivers/staging/wilc1000/host_interface.h | 3 -

[PATCH v2 09/26] staging: wilc1000: move static variable clients_count to 'wilc' structure

2018-09-04 Thread Ajay Singh
Avoid use of static variable 'clients_count' and move it part of 'wilc' structure. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 9 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH v2 17/26] staging: wilc1000: move tcp_ack_filter algo related variables to 'wilc_vif' struct

2018-09-04 Thread Ajay Singh
Avoid use of static variables and move them as part of wilc_vif struct. Move all the parameters related to tcp_ack_filter algo to wilc_vif struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 4 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +-

[PATCH v2 19/26] staging: wilc1000: use short names to fix over 80 issue in tcp_process()

2018-09-04 Thread Ajay Singh
Use short variable names to avoid line over 80 chars checkpatch warning in tcp_process(). struct pending_acks_info --> struct pending_ack int tcp_pending_ack_idx --> int ack_idx u32 pending_ack --> u32 pending_ack_idx Signed-off-by: Ajay Singh ---

[PATCH v2 13/26] staging: wilc1000: rename 'dummy_statistics' variable to 'periodic_stat'

2018-09-04 Thread Ajay Singh
Cleanup patch to use appropriate variable name to fetch the periodic statistics. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 10/26] staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global

2018-09-04 Thread Ajay Singh
Refactor the code to avoid use of 'wilc_set_multicast_list' global variable. Allocate the memory required to keep the multicast mac address and pass it to the worker thread. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 13 +++--

[PATCH v2 04/26] staging: wilc1000: remove unnecessary NULL check in clear_shadow_scan()

2018-09-04 Thread Ajay Singh
Cleanup patch to remove the unnecessary NULL check before freeing up ies information in clear_shadow_scan(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v2 18/26] staging: wilc1000: avoid line over 80 chars in wilc_wlan_txq_filter_dup_tcp_ack()

2018-09-04 Thread Ajay Singh
Cleanup patch to avoid line over 80 chars checkpatch issue introduced in previous code refactor commit. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c

[PATCH v2 02/26] staging: wilc1000: move 'aging_timer' static variable to wilc_priv struct

2018-09-04 Thread Ajay Singh
Moved 'aging_timer' to wilc_priv struct instead of having it as static variable. As 'aging_timer' is maintained for each interfaces so 'op_ifcs' check is not required before the timer_setup() and del_timer_sync() call. Signed-off-by: Ajay Singh ---

[PATCH v2 03/26] staging: wilc1000: fix to use correct index to free scanned info in clear_shadow_scan()

2018-09-04 Thread Ajay Singh
Fixes to use correct index to free the allocated memory for ies information. The check was done using 'last_scanned_cnt' index and its not correct, so use the correct index ('i') to check for before freeing the allocated memory. Signed-off-by: Ajay Singh ---

[PATCH v2 06/26] staging: wilc1000: move during_ip_timer & wilc_optaining_ip to 'wilc_vif' struct

2018-09-04 Thread Ajay Singh
Move global variable 'wilc_during_ip_timer' and 'wilc_optaining_ip' to 'wilc_vif' structure. Rename these variables like below wilc_during_ip_timer -> during_ip_timer wilc_optaining_ip -> obtaining_ip. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 15

[PATCH v2 00/26] staging: wilc1000: avoid use of static and global variable

2018-09-04 Thread Ajay Singh
This patch set mainly contains changes to avoid the use of static and global variables. Also contains few patch to avoid the checkpatch warning arise due to code refactor. Changes since v1: 1. rework on patch#10, use dynamically allocating memory to maintain multicast mac address filter

[PATCH v2 01/26] staging: wilc1000: move 'wilc_enable_ps' global variable into 'wilc' struct

2018-09-04 Thread Ajay Singh
Instead of having 'wilc_enable_ps' as global variable moved it to 'wilc' structure. Rename 'wilc_enable_ps' to 'enable_ps' as its already part of 'wilc' structure Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 5 ++---