[PATCH 2/2] drivers: staging: wilc1000: Call kfree only for error cases

2015-10-03 Thread Chandra S Gorentla
for target block of goto statement; hence it is removed Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000

[PATCH 1/2] drivers: staging: wilc1000: Move spin lock to the start of critical section

2015-10-03 Thread Chandra S Gorentla
The spin_lock_irqsave is moved to just beginning of critical section. This change moves a couple of return statements out of the lock. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 1/3] drivers: staging: wilc1000: Check for errors before kfree

2015-10-02 Thread Chandra S Gorentla
During the clean-up of the function, it is need to check if errors occurred, not the memory pointer. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b

[PATCH 3/3] drivers: staging: wilc1000: Do not return from function with lock is on

2015-10-02 Thread Chandra S Gorentla
There are a couple of return statements before unlock. Lock is moved to a location just before queue manipulation. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH 2/3] drivers: staging: wilc1000: Remove ineffective code

2015-10-02 Thread Chandra S Gorentla
The value of 'result' is not modified from 0 after initialization. Hence no need to check it. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drive

[PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists

2015-09-28 Thread Chandra S Gorentla
- The message queue is replaced with standard Linux linked list - kmem_cache is used for list members - A check for return value of receive method is added - GFP_ATOMIC is changed to GFP_KERNEL - A few other related minor changes Signed-off-by: Chandra S Gorentla --- - Comments of Dan

[PATCH 2/2] drivers: staging: wilc1000: wilc_msgqueue.c: Remove code that no effect

2015-09-28 Thread Chandra S Gorentla
Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index a01ada4..1a411d3 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c

[PATCH 2/2] drivers: staging: wilc1000: wilc_msgqueue.c: Remove ineffective code

2015-09-28 Thread Chandra S Gorentla
Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_msgqueue.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index a01ada4..1a411d3 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c

[PATCH] drivers: staging: wilc1000: Replace message queue with standard Linux lists

2015-09-27 Thread Chandra S Gorentla
The message queue is replaced with standard Linux linked list. A check for return value of receive method is added. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/host_interface.c | 7 +++- drivers/staging/wilc1000/wilc_msgqueue.c | 62 ++- drivers

[PATCH v2] drivers: staging: wilc1000: Add check for SPI availability

2015-09-15 Thread Chandra S Gorentla
NULL pointer deference is observed in the wilc1000.ko module with bus type SPI and when SPI is not ready. Signed-off-by: Chandra S Gorentla --- v2 - Subject corrected 'stating:' -> 'staging:' Following are the steps to reproduce. $ sudo insmod drivers/staging/wilc

[PATCH] drivers: stating: wilc1000: Add a check for SPI availability

2015-09-14 Thread Chandra S Gorentla
NULL pointer deference is observed in the wilc1000.ko module with bus type SPI and when SPI is not ready. Signed-off-by: Chandra S Gorentla --- Following are the steps to reproduce. $ sudo insmod drivers/staging/wilc1000/wilc1000.ko $ sudo ifconfig wlan1 up wlan1 in the above command is the

[PATCH] staging: wilc1000: Set all options in region debugfs file

2015-08-18 Thread Chandra S Gorentla
gions on which logging is enabled. The DBG_REGION_ALL now includes 3 additional regions TCP_ENH, SPIN_DEBUG and FIRM_DBG. Before this change, the region flag FIRM_DBG is enabled during initialization but cleared after a write to the debugfs file. Signed-off-by: Chandra S Gorentla --- It is verifie

[PATCH v3] staging: wilc1000: Process WARN, INFO options of debug levels from user

2015-08-14 Thread Chandra S Gorentla
option that is enabled by default is ERR. As a side effect, this patch removes the 'sparse' warning - 'warning: incorrect type in argument 2 (different address spaces)'. Signed-off-by: Chandra S Gorentla --- Changes in v3: Added back a printk that was removed from v1 Cha

[PATCH v2] staging: wilc1000: Process WARN, INFO options of debug levels from user

2015-08-14 Thread Chandra S Gorentla
default option ERR. As a side effect, this patch removes the 'sparse' warning - 'warning: incorrect type in argument 2 (different address spaces)'. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_debugfs.c | 28 +--- 1 file cha

[PATCH] staging: wilc1000: Process WARN, INFO options of debug levels from user

2015-08-12 Thread Chandra S Gorentla
default option ERR. As a side effect, this patch removes the 'sparse' warning - 'warning: incorrect type in argument 2 (different address spaces)'. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_debugfs.c | 26 -- 1 file chan

[PATCH v2] staging: wilc1000: Remove pointer and integer comparision

2015-08-09 Thread Chandra S Gorentla
Removed pointer check with integer; this fixes 'sparse' error - error: incompatible types for operation (>) left side has type unsigned char [usertype] *[usertype] pu8Tail right side has type int Signed-off-by: Chandra S Gorentla --- Changes in v2: Subject line corr

[PATCH] staging: wilc100: Remove pointer and integer comparision

2015-08-09 Thread Chandra S Gorentla
Removed pointer check with integer; this fixes 'sparse' error - error: incompatible types for operation (>) left side has type unsigned char [usertype] *[usertype] pu8Tail right side has type int Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/host_interfac

[PATCH 4/4] staging: wilc1000: Remove braces for single statement 'if' and 'else'

2015-08-08 Thread Chandra S Gorentla
Fixes the checkpatch.pl warning - braces {} are not necessary for any arm of this statement Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/coreconfigurator.c | 10 - drivers/staging/wilc1000/host_interface.c | 19 - drivers/staging/wilc1000

[PATCH 2/4] staging: wilc1000: Remove unused extern declarations

2015-08-08 Thread Chandra S Gorentla
'extern' declarations which are not referenced within the file are removed. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/host_interface.c | 1 - drivers/staging/wilc1000/linux_wlan_sdio.c| 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 -

[PATCH 1/4] staging: wilc1000: Add space between the braces

2015-08-08 Thread Chandra S Gorentla
Inserted space between nested braces. This fixes the checkpatch.pl error - space required after that close brace '}'. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

staging: wilc1000 Fixes for style errors/warnings

2015-08-08 Thread Chandra S Gorentla
This series fix some of the errors and warnings found using checkpatch.pl. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 3/4] staging: wilc1000: Remove ' ' before quoted '\n'

2015-08-08 Thread Chandra S Gorentla
Fixes the checkpatch.pl warning - 'unnecessary whitespace before a quoted newline'. Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/linux_wlan.c | 20 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 42 +++ drivers/stagin

[PATCH v3 0/3] drivers: staging: wilc1000: Fix a few style errors

2015-08-05 Thread Chandra S Gorentla
v3 - Resending as v2 patch was series missing signedoff line. Corrected now. v2 - Resending as v1 patch series did not apply cleanly. These patches fixes a few style errors reported by checkpatch.pl. PATCH 3/3 should be applied after PATCH 2/3. -- To unsubscribe from this list: send the line "un

[PATCH v3 2/3] drivers: staging: wilc1000: move { to previous line

2015-08-05 Thread Chandra S Gorentla
Moved the opening brace of code blocks to the previous lines. This fixes the checkpatch.pl error - "that open brace { should be on the previous line". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insert

[PATCH v3 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-05 Thread Chandra S Gorentla
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". Signed-off-by: Chandra S Gorentla

[PATCH v3 3/3] drivers: staging: wilc1000: remove space after '('

2015-08-05 Thread Chandra S Gorentla
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file chan

[PATCH v2 2/3] drivers: staging: wilc1000: move { to previous line

2015-08-05 Thread Chandra S Gorentla
Moved the opening brace of code blocks to the previous lines. This fixes the checkpatch.pl error - "that open brace { should be on the previous line". --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/stagin

[PATCH v2 3/3] drivers: staging: wilc1000: remove space after '('

2015-08-05 Thread Chandra S Gorentla
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_w

[PATCH v2 0/3] drivers: staging: wilc1000: Fix a few style errors

2015-08-05 Thread Chandra S Gorentla
v2 - Resending as v1 patch series did not apply cleanly. These patches fixes a few style errors reported by checkpatch.pl. PATCH 3/3 should be applied after PATCH 2/3. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.or

[PATCH v2 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-05 Thread Chandra S Gorentla
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". --- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000

drivers: staging: wilc1000: Fix a few style erros

2015-08-02 Thread Chandra S Gorentla
These patches fixes a few style errors reported by checkpatch.pl. PATCH 3/3 should be applied after PATCH 2/3. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[PATCH 3/3] drivers: staging: wilc1000: remove space after '('

2015-08-02 Thread Chandra S Gorentla
The character ' ' is removed after the character '('. This fixes the checkpatch.pl error - "space prohibited after that open parenthesis '('". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file chan

[PATCH 2/3] drivers: staging: wilc1000: move { to previous line

2015-08-02 Thread Chandra S Gorentla
Moved the opening brace of code blocks to the previous lines. This fixes the checkpatch.pl error - "that open brace { should be on the previous line". Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 +++-- 1 file changed, 3 insert

[PATCH 1/3] drivers: staging: wilc1000: use 'void' for no arguments functions

2015-08-02 Thread Chandra S Gorentla
Added 'void' keyword in the paranthesis of function definitions, when there are no arguments to the functions. This fixes the checkpatch.pl error - "Bad function definition 'function()' should probably be function(void)". Signed-off-by: Chandra S Gorentla

[PATCH] staging: wilc1000: host_interface.c: Fix build warning

2015-07-29 Thread Chandra S Gorentla
Fixed - warning: ‘*((void *)&strHostIFmsg+4).pu8Head’ may be used uninitialized Signed-off-by: Chandra S Gorentla --- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/sta