[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 --- .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c

Re: [PATCH] staging/ks7010: Fix type assignment for struct hostif_hdr

2017-05-01 Thread Tobin C. Harding
On Sat, Apr 29, 2017 at 07:54:30PM +0200, Cezary Gapinski wrote: > Sparse spits out a warnings about __le16 and unsigned short assignment. > Change the type of size and event members of struct hostif_hdr > to __le16 and correct conversion to the proper cpu type. > > Signed-off-by: Cezary Gapinski

[PATCH] staging: rtl8723bs: Fix coding style issues

2017-05-01 Thread Adheer Chandravanshi
Fix style issues as reported by checkpatch.pl Signed-off-by: Adheer Chandravanshi --- drivers/staging/rtl8723bs/include/rtl8192c_recv.h | 9 + drivers/staging/rtl8723bs/include/rtl8192c_rf.h | 22 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/

Re: [PATCH] staging: rtl8723bs: Fix coding style issues

2017-05-01 Thread Greg KH
On Mon, May 01, 2017 at 04:19:48PM +0530, Adheer Chandravanshi wrote: > Fix style issues as reported by checkpatch.pl That's really vague, you need to be specific, and only fix one type of thing per patch. thanks, greg k-h ___ devel mailing list de...@

Re: [PATCH] staging/ks7010: Fix type assignment for struct hostif_hdr

2017-05-01 Thread gapalinux
On Mon, 1 May 2017 19:59:44 +1000 "Tobin C. Harding" wrote: > On Sat, Apr 29, 2017 at 07:54:30PM +0200, Cezary Gapinski wrote: > > Sparse spits out a warnings about __le16 and unsigned short > > assignment. Change the type of size and event members of struct > > hostif_hdr to __le16 and correct c

Fix kbuild warnings

2017-05-01 Thread Tuomo Rinne
Fix kbuild warnings by passing in variable using address rather than making a copy. Tuomo Rinne (1): staging: rtl8192u: Convert u4bAcParam back to little-endian after construction drivers/staging/rtl8192u/r8192U_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 __

[PATCH 1/1] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction

2017-05-01 Thread Tuomo Rinne
The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in r8192U_dm.c") adds casting of le16 from cpu endianness. This patch converts the u4bAcParam parameter back to little-endian after it has been constructed. Signed-off-by: Tuomo Rinne --- drivers/staging/rtl8192u/r8192U_dm.c | 2

[PATCH] staging: octeon: use __func__ instead of func name

2017-05-01 Thread Craig Kewley
Fix checkpatch warning: WARNING: Prefer using '"%s...", __func__' to using 'INTERFACE' Signed-off-by: Craig Kewley --- drivers/staging/octeon/ethernet-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon/ethernet-util.h b/drivers/staging/octeon/ether

Re: [PATCH] staging/ks7010: Fix type assignment for struct hostif_hdr

2017-05-01 Thread Tobin C. Harding
On Mon, May 01, 2017 at 04:11:30PM +0200, gapalinux wrote: > On Mon, 1 May 2017 19:59:44 +1000 > "Tobin C. Harding" wrote: > > > On Sat, Apr 29, 2017 at 07:54:30PM +0200, Cezary Gapinski wrote: > > > Sparse spits out a warnings about __le16 and unsigned short > > > assignment. Change the type of

Re: [PATCH 1/1] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction

2017-05-01 Thread Greg KH
On Mon, May 01, 2017 at 06:11:58PM +0100, Tuomo Rinne wrote: > > The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in > r8192U_dm.c") > adds casting of le16 from cpu endianness. > This patch converts the u4bAcParam parameter back to little-endian after > it has been constructed. >

[PATCH 2/3] staging: rtl8192u: Improve code readability

2017-05-01 Thread Tuomo Rinne
Split the u4bAcParam parameter construction to multiple lines for easier readability. Signed-off-by: Tuomo Rinne --- drivers/staging/rtl8192u/r8192U_dm.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/driv

[PATCH 3/3] staging: rtl8192u: Convert u4bAcParam to little-endian

2017-05-01 Thread Tuomo Rinne
The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in r8192U_dm.c") adds casting of le16 from cpu endianness. Therefore constructing u4bAcParam potentially using big-endian order. This patch converts the u4bAcParam parameter back to little-endian after it has been constructed. Hence

[PATCH 1/3] staging: rtl8192u: Remove unnecessary scope

2017-05-01 Thread Tuomo Rinne
Remove scope unnecessary scope that is already enforced by the if statements scope. Signed-off-by: Tuomo Rinne --- drivers/staging/rtl8192u/r8192U_dm.c | 66 +--- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_dm.c

[PATCH 0/3] staging: rtl8192u: Refactor u4bAcParam construction

2017-05-01 Thread Tuomo Rinne
This is a resubmission of patch series. This submission fixes the warnings reported by kbuild robot by passing in u4bAcParam to cpu_to_le32s using pointer rather than value. This submission also fixes erroneous line deletion reported by reviewer. I've also amended the commit message of the last

Re: [PATCH 1/1] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction

2017-05-01 Thread Tuomo
On Mon, May 01, 2017 at 02:34:36PM -0700, Greg KH wrote: > On Mon, May 01, 2017 at 06:11:58PM +0100, Tuomo Rinne wrote: > > > > The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in > > r8192U_dm.c") > > adds casting of le16 from cpu endianness. > > This patch converts the u4bAcPara

[PATCH] drivers/staging/speakup: Align block comments at *

2017-05-01 Thread Tiago Koji Castro Shibata
Fix checkpatch.pl "WARNING: Block comments should align the * on each line" Signed-off-by: Tiago Koji Castro Shibata --- drivers/staging/speakup/speakup_dtlk.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/speakup/speakup_dtlk.h b/drivers/staging

[PATCH v2 2/7] staging: rtl8723bs: Wrap multi-line macros in do-while loop

2017-05-01 Thread Justin Vreeland
Wrapping in do-while ensures macros are executed as expected. Signed-off-by: Justin Vreeland --- v2: - Added commit message drivers/staging/rtl8723bs/hal/odm_debug.h | 81 +-- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/drivers/staging/rtl8723bs

[PATCH v2 1/7] staging: rtl8723bs: Fix initialization of static variables

2017-05-01 Thread Justin Vreeland
Do not initialize static to 0 Do not initialize static to false Signed-off-by: Justin Vreeland --- drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 8 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 4 ++-- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +- drivers/staging/rtl87

[PATCH v2 0/7] staging: rtl8732: Various checkpatch fixes

2017-05-01 Thread Justin Vreeland
v2: Added commit messages Fixed overly long lines Added Bastien Nocera's Reviewed-by tag - Also fixed commit messages marked reviewed, hope that's OK. The patch contents are identical. Justin Vreeland (7): staging: rtl8723bs: Fix initialization of static variables staging: rtl8

[PATCH v2 5/7] staging: rtl8723bs: Fix pointer style

2017-05-01 Thread Justin Vreeland
Fix "(foo*)" should be "(foo *)" Fix "foo * bar" should be "foo *bar" Signed-off-by: Justin Vreeland Reviewed-by: Bastien Nocera --- v2: - Added Reviewed-by tag drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/st

[PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional

2017-05-01 Thread Justin Vreeland
Ensure checkpatch compliance Signed-off-by: Justin Vreeland --- v2: - Added commit message - Fixed overly long lines drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 18 -- drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 12 ++-- drivers/staging/rtl8723bs/hal/rtl8

[PATCH v2 3/7] staging: rtl8723bs: Macros with complex values should be enclosed in parentheses

2017-05-01 Thread Justin Vreeland
Enclosing macros with complex values ensures expression is evaluated as expected. Signed-off-by: Justin Vreeland --- v2: - Added spaces around plus signs - Fixed line over 80 columns - Added commit message drivers/staging/rtl8723bs/hal/odm.h | 5 - 1 file changed, 4 insertions(+), 1 d

[PATCH v2 6/7] staging: rtl8723bs: Fix spacing around '<'

2017-05-01 Thread Justin Vreeland
Ensure checkpatch compliance Signed-off-by: Justin Vreeland Reviewed-by: Bastien Nocera --- v2: - Added commit message - Added Reviewed-by tag drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/rt

[PATCH v2 7/7] staging: rtl8723bs: Do not use assignment in if condition

2017-05-01 Thread Justin Vreeland
Ensure checkpatch compliance Signed-off-by: Justin Vreeland Reviewed-by: Bastien Nocera --- v2: - Added commit message - Added Reviewed-by tag drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/hal/

Re: [PATCH] staging: rtl8723bs: Fix coding style issues

2017-05-01 Thread adheer chandravanshi
On Mon, May 1, 2017 at 5:40 PM, Greg KH wrote: > On Mon, May 01, 2017 at 04:19:48PM +0530, Adheer Chandravanshi wrote: >> Fix style issues as reported by checkpatch.pl > > That's really vague, you need to be specific, and only fix one type of > thing per patch. > > thanks, > > greg k-h Thanks for

[PATCH 2/7] staging:r8188eu: use different mon_recv_decrypted() inside rtl88eu_mon_recv_hook() and rtl88eu_mon_xmit_hook().

2017-05-01 Thread Ivan Safonov
Create mon_recv_decrypted_recv() to change rtl88eu_mon_recv_hook() without affect to rtl88eu_mon_xmit_hook(). Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/mon.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188

[PATCH 4/7] staging:r8188eu: trim IV/ICV fields in validate_recv_data_frame()

2017-05-01 Thread Ivan Safonov
Length of IV/ICV fields calculated here, so trim these field here too. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_recv.c | 17 ++--- drivers/staging/rtl8188eu/os_dep/mon.c| 19 --- 2 files changed, 14 insertions(+), 22 deletions(-) diff --

[PATCH 3/7] staging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv()

2017-05-01 Thread Ivan Safonov
It is useful to remove IV/ICV from rtl88eu_mon_recv_hook(). Also unprotect_frame() will be very short without skb_(pull|trim). Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/mon.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/stagi

[PATCH 1/7] staging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_mon_recv_hook()

2017-05-01 Thread Ivan Safonov
IV/ICV should be trimmed immediately after decoding (this is a decryptor job). Trim IV/ICV inside decrypt() for SW decrypted frames, for HW decrypted - before rtl88eu_mon_recv_hook(). Adopt frames receive process to work without IV/ICV fields. Signed-off-by: Ivan Safonov --- drivers/staging/rt

[PATCH 7/7] staging:r8188eu: remove unused definitions from include/ieee80211.h

2017-05-01 Thread Ivan Safonov
Remove unused RTW_IEEE80211_FCTL_*, RTW_IEEE80211_FTYPE_*, RTW_IEEE80211_STYPE_*, IEEE80211_STATMASK_*, IEEE80211_DEFAULT_*, BEACON_PROBE_SSID_ID_POSITION, MFIE_TYPE_*, IEEE80211_DTIM_* and IEEE80211_PS_*. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/include/ieee80211.h | 91 ---

[PATCH 5/7] staging:r8188eu: remove ieee80211_get_hdrlen()

2017-05-01 Thread Ivan Safonov
ieee80211_get_hdrlen is unused, remove it and all corresponding code. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 -- drivers/staging/rtl8188eu/include/ieee80211.h | 13 - 2 files changed, 40 deletions(-) diff --git a/

[PATCH 6/7] staging:r8188eu: remove ieee80211_is_empty_essid()

2017-05-01 Thread Ivan Safonov
ieee80211_is_empty_essid() is unused, remove it. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 17 - drivers/staging/rtl8188eu/include/ieee80211.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee8