[PATCH v2] staging: rtl8192u: Fix type mismatch warnings reported by sparse

2017-05-12 Thread suniel . spartan
From: Suniel Mahesh Mk16_le() is an inline function returning le16_to_cpu() which is causing type mismatch warnings. Removed Mk16_le() and replaced it with le16_to_cpu() with appropriate argument type as suggested by Greg K-H. Signed-off-by: Suniel Mahesh

[PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse

2017-05-09 Thread suniel . spartan
From: Suniel Mahesh The function Mk16_le() is calling le16_to_cpu() internally. le16_to_cpu() takes an argument of type (__le *) but the argument passed is of type (u16 *). Fixed it by passing the correct argument type. Signed-off-by: Suniel Mahesh

[PATCH] staging: rtl8192u: Fix type mismatch warnings reported by sparse

2017-05-01 Thread suniel . spartan
From: Suniel Mahesh The function Mk16_le() is calling le16_to_cpu() internally. le16_to_cpu() takes an argument of type (__le *) but the argument passed is of type (u16 *). Fixed it by passing the correct argument. Signed-off-by: Suniel Mahesh

[PATCH] staging: rtl8192e: Fix embedded function names with __func__

2017-03-23 Thread suniel . spartan
From: Suniel Mahesh Prefer and make it generic by using %s and __func__ to print functions name instead of embedding functions name in print statements Signed-off-by: Suniel Mahesh --- drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 22

[PATCH v5 6/6] staging: rtl8192e: Fix blank lines and space after a cast

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Fixed the following checkpatch.pl checks: Blank lines aren't necessary after an open brace '{' and before a close brace '}', removed No space is necessary after a cast, removed Please don't use multiple blank lines, removed Signed-off-by: Suniel

[PATCH v5 5/6] staging: rtl8192e: Fix issues reported by checkpatch.pl

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Fixed the following checkpatch.pl checks: spaces preferred around that 'operator', spacing provided Logical continuations should be on the previous line, modified accordingly Unnecessary parentheses around variables, removed Please use a blank line

[PATCH v5 2/6] staging: rtl8192e: Remove unnecessary 'out of memory' message

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Fixed the following checkpatch.pl warning: Possible unnecessary 'out of memory' message If it is out of memory, function should return with an appropriate error code. Since this function is of type void, a return statement is used. Signed-off-by:

[PATCH v5 1/6] staging: rtl8192e: Fix comments as per kernel coding style

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Fixed the following checkpatch.pl warnings: Block comments should align the * on each line Block comments use * on subsequent lines Signed-off-by: Suniel Mahesh --- Changes for v5: - Changed email address from

[PATCH v5 4/6] staging: rtl8192e: Pass a pointer as an argument to sizeof() instead of struct

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Replaced sizeof(struct foo) into sizeof(*ptr), found by checkpatch.pl Signed-off-by: Suniel Mahesh --- Changes for v5: - Changed email address from suni...@techveda.org to suniel.spar...@gmail.com, reason being few

[PATCH v5 0/6] staging: rtl8192e: Fix coding style, warnings and checks

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh Changed email address from suni...@techveda.org to suniel.spar...@gmail.com, reason being few patches were being dropped and not getting delivered, couldn't resolve that issue. Split earlier patches into multiple commits for easy review as suggested

[PATCH v5 3/6] staging: rtl8192e: Rectify pointer comparisions with NULL

2017-03-21 Thread suniel . spartan
From: Suniel Mahesh This patch simplifies code by replacing explicit NULL comparison with ! or unmark operator Reported by checkpatch.pl for comparison to NULL could be written '!foo' or 'foo' Signed-off-by: Suniel Mahesh --- Changes for v5: