[PATCH RESEND 06/46] staging: wilc1000: remove io_type of wilc_wlan_dev_t

2015-12-20 Thread Glen Lee
io_type of wilc_wlan_dev_t is unneeded, we can use io_type of struct wilc. Remove io_type of wilc_wlan_dev_t and use io_type of wilc. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-)

[PATCH RESEND 12/46] staging: wilc1000: linux_wlan_sdio.c: fix checkpatch warning line over 80

2015-12-20 Thread Glen Lee
This patch fixes checkpatch warning line over 80 characters. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_sdio.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c

[PATCH RESEND 14/46] staging: wilc1000: wilc_sdio_cmd53: return linux error value

2015-12-20 Thread Glen Lee
This patch changes return value with linux error value, not 1 or 0. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_sdio.c | 7 ++- drivers/staging/wilc1000/wilc_sdio.c | 26 -- 2 files changed, 18 insertions(+), 15

[PATCH RESEND 09/46] staging: wilc1000: sdio/spi: use device print api instead of custom one

2015-12-20 Thread Glen Lee
This patch use device print api instead of driver defined print. Remove varialbe dPrint as well. String "[wilc sdio]" and "[wilc spi]" are also removed from all the print statment if exist because it shows which device the message is related to. Signed-off-by: Glen Lee ---

[PATCH RESEND 10/46] staging: wilc1000: remove wilc_debug_func of hif_init

2015-12-20 Thread Glen Lee
This patch removes wilc_debug_func of hif_init and remove it's related functions as well because it is not used anymore. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_sdio.c | 2 +- drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c

[PATCH RESEND 17/46] staging: wilc1000: linux_wlan_spi.c: add a blank

2015-12-20 Thread Glen Lee
This patch fixes checkpatch warning: missing a blank like after declarations. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c

[PATCH RESEND 18/46] staging: wilc1000: linux_wlan_spi.c: fix NULL comparison style

2015-12-20 Thread Glen Lee
This patch fixes checkpatch CHECK:comparison to NULL could be written "b". Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan_spi.c

[PATCH RESEND 13/46] staging: wilc1000: linux_wlan_sdio.c: remove braces

2015-12-20 Thread Glen Lee
This patch fixes checkpatch warning braces{} are not necessary for single statment blocks. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c

[PATCH RESEND 05/46] staging: wilc1000: wilc_wlan.c: remove hif_func of wilc_wlan_dev_t

2015-12-20 Thread Glen Lee
hif_func of wilc_wlan_dev_t is duplicate because we have same struct wilc_hif_func ops of struct wilc which is available in wilc_wlan.c. Rename ops of struct wilc with hif_func and remove hif_func of wilc_wlan_dev_t, and use wilc->hif_func instead of g_wlan.hif_func in all functions.

[PATCH RESEND 08/46] staging: wilc1000: move all of wilc_wlan_dev_t to struct wilc

2015-12-20 Thread Glen Lee
linux_wlan.c and wilc_wlan.c was separated into two part at the beginning to support various platforms. They are in charge of send/receive control and packet data, so they will be merged into one file wlan.c later. First of all, wilc_wlan_dev_t which is used as global variable of wilc_wlan.c will

[PATCH RESEND 15/46] staging: wilc1000: wilc_sdio_cmd52: return linux error value

2015-12-20 Thread Glen Lee
This patch changes return value with linux error value, not 1 or 0. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_sdio.c | 6 ++-- drivers/staging/wilc1000/wilc_sdio.c | 51 +++--- 2 files changed, 35 insertions(+), 22

[PATCH RESEND 11/46] staging: wilc1000: remove unused functions

2015-12-20 Thread Glen Lee
This patch removes unused function pointer hif_sync and hif_clear_int, and removes it's related functions sdio_clear_int, sdio_sync, wilc_spi_clear_int and wilc_spi_sync. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_sdio.c | 94

[PATCH RESEND 04/46] staging: wilc1000: use kernel define byte order macros

2015-12-20 Thread Glen Lee
This patch removes define BIG_ENDIAN and use kernel define byte order macros instead of swap itself. Remove unused BYTE_SWAP macro and __CHECK_ENDIAN__ in Makefile also. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile| 2 +-

[PATCH RESEND 03/46] staging: wilc1000: rename index to tcp_pending_ack_idx

2015-12-20 Thread Glen Lee
This patch renames "index" of struct txq_entry_t to tcp_pending_ack_idx since this name could be confused index of txq_entry_t. It is index of tcp pending ack. It fixes 8e55639d066f4ef402ba88fca08ed1be70e1c4da Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c

[PATCH RESEND 07/46] staging: wilc1000: remove unused varialbe tx_buffer_offset

2015-12-20 Thread Glen Lee
This patch removes unused variable tx_buffer_offset of wilc_wlan_dev_t. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index

[PATCH RESEND 41/46] staging: wilc1000: change join_req_drv type and it's name

2015-12-20 Thread Glen Lee
To use wilc_get_vif_idx instead of the last get_id_from_handler, join_req_drv needs to be changed it's type with wilc_vif and name as well. As a result, get_id_from_handler is not used anymore, so remove it. Signed-off-by: Glen Lee ---

[PATCH RESEND 01/46] staging: wilc1000: remove define COMPLEMENT_BOOT

2015-12-20 Thread Glen Lee
This patch removes define COMPLEMENT_BOOT in Makefile. The feature was removed by commit b46d68825c2d ('staging: wilc1000: remove COMPLEMENT_BOOT') but the define was not removed. So remove completely. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile | 2 -- 1

[PATCH RESEND 02/46] staging: wilc1000: remove wilc memory allocation config

2015-12-20 Thread Glen Lee
This patch remove memory allocation options in Kconfig. It was used a long time ago to aquire memory, which we will not use this config anymore. Remove it's config, related define and codes as well. We will take PREALLOCATE_AT_LOADING_DRIVER as it is default. Signed-off-by: Glen Lee

[PATCH RESEND 00/46] Rebase and resend

2015-12-20 Thread Glen Lee
As requested, I rebased all of my pending patches on staging-testing branch and resend what is not applied. Glen Lee (42): staging: wilc1000: remove define COMPLEMENT_BOOT staging: wilc1000: remove wilc memory allocation config staging: wilc1000: rename index to tcp_pending_ack_idx

[PATCH RESEND 36/46] staging: wilc1000: remove argument hif_drv

2015-12-20 Thread Glen Lee
In previous patch we add new argument vif which has hif_drv in it's member. Therefore, no need to pass hif_drv in those functions. Remove argument struct host_if_drv and use hif_drv of vif. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 177

[PATCH RESEND 39/46] staging: wilc1000: use vif index to communicate with wilc device

2015-12-20 Thread Glen Lee
We now have vif index in all functions related with host interface thread. wilc_get_vif_idx and wilc_get_vif_from_idx are added to get id and vif respectively. Relace get_id_from_handler with wilc_get_vif_idx and get_handler_from_id with wilc_get_vif_from_idx. Remove unused function

[PATCH RESEND 35/46] staging: wilc1000: pass vif to hostIFthread

2015-12-20 Thread Glen Lee
We will pass vif, which is currently being used as net_device, instead of hif_dev. This is the first step to use index of vif to pass to the driver. Add new argument vif to all the functions that send message to hostIFthread and set vif to msg.vif. As a result, hostIfthread will get vif. In later

[PATCH RESEND 38/46] staging: wilc1000: pass struct wilc

2015-12-20 Thread Glen Lee
Pass struct wilc to the following functions. The functions need wilc to get proper vif using id from wilc device. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/coreconfigurator.h | 11 ++- drivers/staging/wilc1000/host_interface.c | 9 ++---

[PATCH RESEND 40/46] staging: wilc1000: wilc_set_wfi_drv_handler: pass vif index

2015-12-20 Thread Glen Lee
Pass index of vif instead of hif_drv. wilc_get_vif_idx is used to get correct index of vif. In the handler function handle_set_wfi_drv_handler, use vif instead of hif_drv, and use hif_drv_handler->handler instead of hif_drv when deinitialize wilc device. Signed-off-by: Glen Lee

[PATCH RESEND 33/46] staging: wilc1000: change vif to pointer to refence real private data

2015-12-20 Thread Glen Lee
vif of struct has it's own memory which is not necessary because we have allocated vif from netdev_priv. Change vif to pointer type and assign vif which is netdev private data. Change it's operator on related codes as well. Signed-off-by: Glen Lee ---

[PATCH RESEND 30/46] staging: wilc1000: remove unused files

2015-12-20 Thread Glen Lee
This patch removes linux_wlan_spi.[ch] which are not used anymore. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile | 2 +- drivers/staging/wilc1000/linux_wlan_spi.c | 16 drivers/staging/wilc1000/linux_wlan_spi.h | 6 -- 3 files

[PATCH RESEND 32/46] staging: wilc1000: move perInterface_wlan_t to wilc_vif

2015-12-20 Thread Glen Lee
perInterface_wlan_t and wilc_vif are all about interface control informations. We will combine those two structures and maintain as one network interface control information. Move all the members of perInterface_wlan_t to wilc_vif and remove the structure. Rename perInterace_wlan_t to wilc_vif and

[PATCH RESEND 44/46] staging: wilc1000: remove wilc of struct host_if_drv

2015-12-20 Thread Glen Lee
vif has wilc in it's members so no need to have wilc in host_if_drv. It is redundant so just remove it and use wilc of vif. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 100 -- drivers/staging/wilc1000/host_interface.h |

[PATCH RESEND 37/46] staging: wilc1000: take vif instead of drv in hostIFthread

2015-12-20 Thread Glen Lee
In the first patch, we sent vif to hostIFthread. we can use vif instead of drv in the all functions which handle the commands from cfg operations. Change first argument host_if_drv with wilc_vif and use hif_drv of wilc_vif. Pass vif to the functions as well. In case of timer callback functions,

[PATCH RESEND 46/46] staging: wilc1000: bug fix on memory free

2015-12-20 Thread Glen Lee
Set tx_buffer to NULL not to free again the memory that is already freed, which could cause system crash when device is failed. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wlan.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH RESEND 43/46] staging: wilc1000: remove drv of struct host_if_msg

2015-12-20 Thread Glen Lee
This patch remove drv of struct host_if msg and it's related codes. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 50 ++- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git

[PATCH RESEND 45/46] staging: wilc1000: set hif_drv before it is used

2015-12-20 Thread Glen Lee
We are using hif_drv of vif, so it needs to be set before it is used. Set hif_drv to vif->hifdrv soon after it is allocated. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/host_interface.c | 6 ++ drivers/staging/wilc1000/linux_wlan.c | 1 - 2 files changed, 6

[PATCH RESEND 42/46] staging: wilc1000: remove used functions

2015-12-20 Thread Glen Lee
This patch remove unused functions add_handler_in_list and remove_handler_in_list, and it's related global variable wfidrv_list and codes. label fail_timer_2 and it's codes are removed since label is not used anymore. Signed-off-by: Glen Lee ---

[PATCH RESEND 34/46] staging: wilc1000: remove duplicate netdev

2015-12-20 Thread Glen Lee
There are two net_device pointer which is the same because two structures are merged into wilc_vif in previous patch. Remove wilc_netdev and change with ndev. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 35 +++

[PATCH RESEND 22/46] staging: wilc1000: wilc_deinit(): fixes inconsistent returns

2015-12-20 Thread Glen Lee
From: Leo Kim This patch fixes the warning reported by smatch. - wilc_deinit() warn: inconsistent returns 'sem:_drv->sem_cfg_values' This semaphore protect a cfg_values variable but cfg_values variables was not used here. So, just remove this line. Signed-off-by: Leo Kim

[PATCH RESEND 23/46] staging: wilc1000: linux_wlan_spi.c: return linux error value

2015-12-20 Thread Glen Lee
return linux error value instead of 0 or 1 and use -EINVAL. Related codes also changed together. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_spi.c | 14 +++--- drivers/staging/wilc1000/wilc_spi.c | 18 +- 2 files changed, 12

[PATCH RESEND 27/46] staging: wilc1000: rename spi function names

2015-12-20 Thread Glen Lee
There are several similar function names, such as wilc_spi_write and _wilc_spi_write. It is likely to be confused after merging linux_wlan_spi.c and wilc_spi.c, so rename following functions properly. Rename wilc_spi_write to wilc_spi_tx, wilc_spi_read to wilc_spi_rx, wilc_spi_write_read to

[PATCH RESEND 21/46] staging: wilc1000: wilc_init(): fixes inconsistent returns

2015-12-20 Thread Glen Lee
From: Leo Kim This patch fixes the warning reported by smatch. - wilc_init() warn: inconsistent returns 'sem:_drv->sem_cfg_values' No need to up the sema here since down was not called before get here. Signed-off-by: Leo Kim Signed-off-by: Glen Lee

[PATCH RESEND 19/46] staging: wilc1000: replace explicit NULL comparisons with !

2015-12-20 Thread Glen Lee
From: Leo Kim This patch replace explicit NULL comparison with ! operator to simplify code. Reported by checkpatch.pl for Comparison to NULL could be written !XXX" or "XXX". Signed-off-by: Leo Kim Signed-off-by: Glen Lee ---

[PATCH RESEND 26/46] staging: wilc1000: remove unused files

2015-12-20 Thread Glen Lee
This patch removes linux_wlan_sdio.[ch] which is not used anymore. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile | 2 +- drivers/staging/wilc1000/linux_wlan_sdio.c | 10 -- drivers/staging/wilc1000/linux_wlan_sdio.h | 1 - 3 files changed,

[PATCH RESEND 24/46] staging: wilc1000: linux_sdio_probe: use return value

2015-12-20 Thread Glen Lee
Return ret from wilc_netdev_init instead of -1 for proper error handling. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_sdio.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c

[PATCH RESEND 25/46] staging: wilc1000: linux_wlan_sdio.c: move all the codes to wilc_sdio.c

2015-12-20 Thread Glen Lee
To Combine linux_wlan_sdio.c and wilc_sdio.c as one file, move all the codes in linux_wlan_sdio.c to wilc_sdio.c, and make functions static only. No Modification has not been made except static, just moved them. Function declaration in linux_wlan_sdio.h is needless, so just remove them.

[PATCH RESEND 28/46] staging: wilc1000: remove unneeded function

2015-12-20 Thread Glen Lee
wilc_spi_init in linux_wlan_spi.c is unneeded. It just return true. Rename _wilc_spi_init in wlan_spi.c to wilc_spi_init. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan_spi.c | 5 - drivers/staging/wilc1000/linux_wlan_spi.h | 1 -

[PATCH RESEND 29/46] staging: wilc1000: linux_wlan_spi.c: move all the codes to wilc_spi.c

2015-12-20 Thread Glen Lee
This patch moves all the codes in linux_wlan_spi.c to wilc_spi.c to make one spi module. Make wilc_spi_tx, wilc_spi_rx and wilc_spi_tx_rx static functions. Remove function declaration in linux_wlan_spi.h, which is unnedded now. No modification has been made inside the codes. linux_wlan_spi.[ch]

[PATCH RESEND 31/46] staging: wilc1000: remove unneeded extern variable

2015-12-20 Thread Glen Lee
This patch removes unnedded extern variable WILC_WFI_devs[] which is not used. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h

[PATCH] staging: wilc1000: fix double mutex_unlock on failure path in wilc_wlan_cleanup()

2015-12-20 Thread Alexey Khoroshilov
If hif_read_reg() or hif_write_reg() fail in wilc_wlan_cleanup(), it calls release_bus() and continues execution. But it leads to double release_bus() call that means double unlock of g_linux_wlan->hif_cs mutex. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey

Re: [Cocci] [PATCH] staging/rdma/hfi1: Fix a possible null pointer dereference

2015-12-20 Thread Julia Lawall
Here is my proposition for finding missing NULL tests. I tried to limit it to generic kmalloc like functions. There are of course many other NULL returning functions, but maybe they could be in an other rule, julia --- /// Look for kmalloc etc that are not followed by a NULL check. //# May

[PATCH 03/13] staging: fbtft: Use standard MIPI DCS command defines for hx8357d

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_hx8357d.c | 38 ++ 1 file changed, 18 insertions(+), 20

[PATCH 02/13] staging: fbtft: Use standard MIPI DCS command defines for hx8353d

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_hx8353d.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git

[PATCH 06/13] staging: fbtft: Use standard MIPI DCS command defines for ili9341

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_ili9341.c | 50 +++--- 1 file changed, 25 insertions(+), 25

[PATCH 10/13] staging: fbtft: Use standard MIPI DCS command defines for st7735r

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_st7735r.c | 42 ++ 1 file changed, 20 insertions(+), 22

[PATCH 04/13] staging: fbtft: Use standard MIPI DCS command defines for ili9163

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_ili9163.c | 86 ++ 1 file changed, 32 insertions(+), 54

[PATCH 00/13] staging: fbtft - Use standard MIPI DCS defines

2015-12-20 Thread Priit Laes
Hello all! This patchset converts most of the magic constants and driver-specific defines to treewide MIPI DCS defines where applicable. Please note that this patchset is mostly compile-tested, as I do not have access to most of the hardware. Priit Laes (13): staging: fbtft: Use standard MIPI

[PATCH 08/13] staging: fbtft: Use standard MIPI DCS command defines for ili9486

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_ili9486.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-)

[PATCH 01/13] staging: fbtft: Use standard MIPI DCS command defines for hx8340bn

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_hx8340bn.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff

[PATCH 09/13] staging: fbtft: Use standard MIPI DCS command defines for s6d02a1

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_s6d02a1.c | 42 +- 1 file changed, 23 insertions(+), 19

[PATCH 12/13] staging: fbtft: Use standard MIPI DCS command defines for tinylcd

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_tinylcd.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff

[PATCH 05/13] staging: fbtft: Use standard MIPI DCS command defines for ili9340

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_ili9340.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff

[PATCH 11/13] staging: fbtft: Use standard MIPI DCS command defines for fbtft driver

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of the magic constants found in source code. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fbtft-core.c | 14 +++ drivers/staging/fbtft/fbtft_device.c | 71

[PATCH 13/13] staging: fbtft: Remove unused and duplicated defines

2015-12-20 Thread Priit Laes
This patch makes use of the standard MIPI Display Command Set to remove some of duplicate defines from the headers. Signed-off-by: Priit Laes --- drivers/staging/fbtft/fb_hx8357d.h | 32 drivers/staging/fbtft/fbtft.h | 8 2 files

[PATCH] Drivers: hv: vmbus: fix the building warning with hyperv-keyboard

2015-12-20 Thread Dexuan Cui
With the recent change af3ff643ea91ba64dd8d0b1cbed54d44512f96cd (Drivers: hv: vmbus: Use uuid_le type consistently), we always get this warning: CC [M] drivers/input/serio/hyperv-keyboard.o drivers/input/serio/hyperv-keyboard.c:427:2: warning: missing braces around initializer