Re: [PATCH] Staging: rtl8192u Make function static

2015-03-31 Thread Eddie Kovsky
On Wed, Apr 01, 2015 at 09:09:26AM +0530, Sudip Mukherjee wrote: > On Tue, Mar 31, 2015 at 05:51:19PM -0600, Eddie Kovsky wrote: > > Changing function definition to static fixes the > > following warning generated by sparse: > > > > drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1924:6: wa

Re: [PATCH] Staging: rtl8192u Make function static

2015-03-31 Thread Sudip Mukherjee
On Tue, Mar 31, 2015 at 05:51:19PM -0600, Eddie Kovsky wrote: > Changing function definition to static fixes the > following warning generated by sparse: > > drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1924:6: warning: > symbol 'ieee80211_check_auth_response' was not declared. Should i

[PATCH] Staging: rtl8192u Make function static

2015-03-31 Thread Eddie Kovsky
Changing function definition to static fixes the following warning generated by sparse: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1924:6: warning: symbol 'ieee80211_check_auth_response' was not declared. Should it be static? Signed-off-by: Eddie Kovsky --- drivers/staging/rtl8192u

Re: [PATCH] staging: lustre: replace kzalloc with copy_from_user with memdup_user

2015-03-31 Thread Drokin, Oleg
On Mar 31, 2015, at 11:57 AM, gre...@linuxfoundation.org wrote: > On Tue, Mar 31, 2015 at 05:15:23PM +0200, Julia Lawall wrote: >> On Tue, 31 Mar 2015, Dhere, Chaitanya (C.) wrote: >> >>> This patch replaces kzalloc and copy_from_user with memdup_user call >>> This change was detected with cocci

[PATCH v2 11/13] staging: rtl8192e: Fix indentation in rtllib_rx_auth_resp()

2015-03-31 Thread Mateusz Kulikowski
Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib_softmac.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 9a4179c..c043d8c 100644

[PATCH v2 12/13] staging: rtl8192e: Comment cleanup (style/format)

2015-03-31 Thread Mateusz Kulikowski
- Multiline comments use "network subsystem comment style" - Merge short multiline comments - Remove empty comments - Remove function name comment at the end of small (<1 screen) functions - Reformat 802.11 data frame format to use spaces and network format Signed-off-by: Mateusz Kulikowski ---

[PATCH v2 09/13] staging: rtl8192e: Divide rtllib_rx_auth()

2015-03-31 Thread Mateusz Kulikowski
Move authentication response processing to rtllib_rx_auth_resp() function. No logic is affected. Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib_softmac.c | 112 -- 1 file changed, 58 insertions(+), 54 deletions(-) diff --git a/drivers/staging/r

[PATCH v2 13/13] staging: rtl8192e: Remove dead code

2015-03-31 Thread Mateusz Kulikowski
Remove commented-out code Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c| 3 +-- drivers/staging/rtl8192e/rtl8192e/r819xE_phyreg.h | 7 --- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 5 + drivers/staging/rtl8192e/rtllib_rx.c

[PATCH v2 05/13] staging: rtl8192e: Fix LINE_CONTINUATIONS warning

2015-03-31 Thread Mateusz Kulikowski
Fix 'Avoid unnecessary line continuations' checkpatch.pl warning Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softma

[PATCH v2 03/13] staging: rtl8192e: remove unused EXPORT_SYMBOL_RSL macro

2015-03-31 Thread Mateusz Kulikowski
This macro caused checkpatch.pl warning and is not used. Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index dc9f675..5363b6f 100644 --- a/driver

[PATCH v2 02/13] staging: rtl8192e: Fix RETURN_VOID warnings

2015-03-31 Thread Mateusz Kulikowski
Fix 'void function return statements are not generally useful' checkpatch.pl warnings Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 7 -

[PATCH v2 10/13] staging: rtl8192e: Decrease nesting of rtllib_rx_auth_resp()

2015-03-31 Thread Mateusz Kulikowski
Return from rtllib_rx_auth_resp() if auth_parse() fails. Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib_softmac.c | 89 --- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/stag

[PATCH v2 08/13] staging: rtl8192e: Fix PRINTK_WITHOUT_KERN_LEVEL warnings

2015-03-31 Thread Mateusz Kulikowski
Replace custom hex dumping function with print_hex_dump_bytes() to make checkpatch.pl happy Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/

[PATCH v2 01/13] staging: rtl8192e: Fix UNNECESSARY_ELSE warning

2015-03-31 Thread Mateusz Kulikowski
Fix checkpatch warnings 'else is not generally useful after a break or return' Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 72 +++--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 +- drivers/staging/rtl8192e/rtl8192e/rtl_cam.c| 7 +- driv

[PATCH v2 06/13] staging: rtl8192e: Fix BRACES warning

2015-03-31 Thread Mateusz Kulikowski
Fix 'braces {} are not necessary for single statement blocks' checkpatch.pl warning Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmwar

[PATCH v2 07/13] staging: rtl8192e: Fix DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON warning

2015-03-31 Thread Mateusz Kulikowski
Fix 'do {} while (0) macros should not be semicolon terminated' checkpatch.pl warning Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl81

[PATCH v2 04/13] staging: rtl8192e: Fix UNNECESSARY_PARENTHESES warnings

2015-03-31 Thread Mateusz Kulikowski
Fix 'Unnecessary parentheses' checkpatch.pl warning Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 ++-- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 ++-- drivers/staging/rtl8192e/rtllib_rx.c | 2 +- 3 files changed, 9 insertions(+)

[PATCH v2 00/13] staging: rtl8192e: checkpatch.pl cleanups

2015-03-31 Thread Mateusz Kulikowski
v2 Notes: Added 2 more patches (none affects code): #12 cleanup of comment style (Joe requested to fix one, did fix of as many as I was able to find) #13 Removed dead code (some functions/structures/defines were commented out) As for v1 review comments - I decided not to merge #10 and #11

Re: [PATCH V2] Staging: rtl8192 Clean up function definition

2015-03-31 Thread Eddie Kovsky
On Tue, Mar 31, 2015 at 10:14:54AM +0300, Dan Carpenter wrote: > On Mon, Mar 30, 2015 at 05:05:36PM -0600, Eddie Kovsky wrote: > > Change function definition to static, move the function further up in > > the file, and delete the function prototype. > > > > This fixes the following warning generat

Re: [PATCH net-next 0/2] hv_netvsc: Eliminate memory allocation in the send path

2015-03-31 Thread David Miller
From: "K. Y. Srinivasan" Date: Sun, 29 Mar 2015 21:07:58 -0700 > The network protocol used to communicate with the host is the remote ndis > (rndis) > protocol. We need to decorate each outgoing packet with a rndis header and > additional rndis state (rndis per-packet state). To manage this stat

[PATCH 2/2] Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case

2015-03-31 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov balloon_wrk.num_pages is __u32 and it comes from host in struct dm_balloon where it is also __u32. We, however, use 'int' in balloon_up() and in case we happen to receive num_pages>INT_MAX request we'll end up allocating zero pages as 'num_pages < alloc_unit' check in alloc

[PATCH 1/2] Drivers: hv: hv_balloon: correctly handle val.freeram

2015-03-31 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov 'Drivers: hv: hv_balloon: refuse to balloon below the floor' fix does not correctly handle the case when val.freeram < num_pages as val.freeram is __kernel_ulong_t and the 'val.freeram - num_pages' value will be a huge positive value instead of being negative. Usually host

[PATCH 0/2] Drivers: hv: hv_balloon: two additional corner cases in balloon_up()

2015-03-31 Thread K. Y. Srinivasan
PATCH 1/2 addresses a real issue introduced by the 'Drivers: hv: hv_balloon: refuse to balloon below the floor' fix, PATCH 2/2 addresses a currently impossible issue (as Hyper-V host never asks to balloon more than INT_MAX pages) and is rather a cleanup. The patch is supposed to be applied on top

RE: [PATCH 7/7] staging: comedi: comedi_fops: extend spin-lock scope in comedi_event()

2015-03-31 Thread Hartley Sweeten
On Tuesday, March 31, 2015 2:43 AM, Ian Abbott wrote: > On 30/03/15 17:47, Hartley Sweeten wrote: >> On Friday, March 27, 2015 8:13 AM, Ian Abbott wrote: >>> `comedi_event()` is called from low-level drivers to handle comedi >>> asynchronous command event flags. As a safety check, it checks the >>

Re: [PATCHv2 0/5] ft1000 driver checkpatch.pl fixes

2015-03-31 Thread Greg Kroah-Hartman
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Thu, Mar 26, 2015 at 08:16:14PM -0700, Janakarajan Natarajan wrote: > I resent v2 because I didn't know if my previous patchset had been accepted or > not. Then it's really not a 'v2' patch series,

Re: [PATCH] staging: lustre: replace kzalloc with copy_from_user with memdup_user

2015-03-31 Thread gre...@linuxfoundation.org
On Tue, Mar 31, 2015 at 05:15:23PM +0200, Julia Lawall wrote: > On Tue, 31 Mar 2015, Dhere, Chaitanya (C.) wrote: > > > This patch replaces kzalloc and copy_from_user with memdup_user call > > This change was detected with coccinelle tool > > > > Signed-off-by: Chaitanya Dhere > > --- > > driver

Re: [PATCH] staging: lustre: replace kzalloc with copy_from_user with memdup_user

2015-03-31 Thread Julia Lawall
On Tue, 31 Mar 2015, Dhere, Chaitanya (C.) wrote: > This patch replaces kzalloc and copy_from_user with memdup_user call > This change was detected with coccinelle tool > > Signed-off-by: Chaitanya Dhere > --- > drivers/staging/lustre/lustre/llite/file.c | 11 +++ > 1 file changed, 3 i

[PATCH] staging: lustre: replace kzalloc with copy_from_user with memdup_user

2015-03-31 Thread Dhere, Chaitanya (C.)
This patch replaces kzalloc and copy_from_user with memdup_user call This change was detected with coccinelle tool Signed-off-by: Chaitanya Dhere --- drivers/staging/lustre/lustre/llite/file.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustr

Re: [PATCH 7/7] staging: comedi: comedi_fops: extend spin-lock scope in comedi_event()

2015-03-31 Thread Ian Abbott
On 30/03/15 17:47, Hartley Sweeten wrote: On Friday, March 27, 2015 8:13 AM, Ian Abbott wrote: `comedi_event()` is called from low-level drivers to handle comedi asynchronous command event flags. As a safety check, it checks the subdevice's "run" flags to make sure an asynchronous command is ru

[patch] Staging: rtl8192u: use correct array for debug output

2015-03-31 Thread Dan Carpenter
This is supposed to be ->rates_ex[] instead of ->rates[]. I found this because static checkers complain than ->rates is too small so we're reading beyond the end of the array. It has 12 elements instead of 15. This bug was apparently copy and pasted from ipw2x00. I fixed it before in that drive

Re: [PATCH V2] Staging: rtl8192 Clean up function definition

2015-03-31 Thread Dan Carpenter
On Mon, Mar 30, 2015 at 05:05:36PM -0600, Eddie Kovsky wrote: > Change function definition to static, move the function further up in > the file, and delete the function prototype. > > This fixes the following warning generated by sparse: > > drivers/staging/rtl8192u/r8192U_core.c:1970:6: warning