[PATCH v2] staging: rtl8188eu: Move a blank line

2018-03-01 Thread Dafna Hirschfeld
Move a blank line from in the middle of a declaration list to
after the declaration list, to improve readability.

Issue found by checkpatch.

Signed-off-by: Dafna Hirschfeld <daf...@gmail.com>
---
 drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c 
b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 17967c9..c3bb183 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -1516,8 +1516,8 @@ void rtw_hal_set_hwreg(struct adapter *Adapter, u8 
variable, u8 *val)
case HW_VAR_CAM_WRITE:
{
u32 cmd;
-
u32 *cam_val = (u32 *)val;
+
usb_write32(Adapter, WCAMI, cam_val[0]);
 
cmd = CAM_POLLINIG | CAM_WRITE | cam_val[1];
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] staging: rtl8192e: Fix issues regarding blank lines

2018-03-01 Thread Dafna Hirschfeld
Fix multiple blank lines and blank lines after braces.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <daf...@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 27 ---
 1 file changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index f802f60..1d9eb54 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -36,7 +36,6 @@ static int _rtl92e_wx_get_freq(struct net_device *dev,
return rtllib_wx_get_freq(priv->rtllib, a, wrqu, b);
 }
 
-
 static int _rtl92e_wx_get_mode(struct net_device *dev,
   struct iw_request_info *a,
   union iwreq_data *wrqu, char *b)
@@ -149,7 +148,6 @@ static int _rtl92e_wx_set_rawtx(struct net_device *dev,
mutex_unlock(>wx_mutex);
 
return ret;
-
 }
 
 static int _rtl92e_wx_force_reset(struct net_device *dev,
@@ -165,7 +163,6 @@ static int _rtl92e_wx_force_reset(struct net_device *dev,
priv->force_reset = *extra;
mutex_unlock(>wx_mutex);
return 0;
-
 }
 
 static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
@@ -231,7 +228,6 @@ static int _rtl92e_wx_set_force_lps(struct net_device *dev,
priv->force_lps = *extra;
mutex_unlock(>wx_mutex);
return 0;
-
 }
 
 static int _rtl92e_wx_set_debug(struct net_device *dev,
@@ -475,12 +471,10 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
return ret;
 }
 
-
 static int _rtl92e_wx_get_scan(struct net_device *dev,
   struct iw_request_info *a,
   union iwreq_data *wrqu, char *b)
 {
-
int ret;
struct r8192_priv *priv = rtllib_priv(dev);
 
@@ -490,7 +484,6 @@ static int _rtl92e_wx_get_scan(struct net_device *dev,
if (priv->bHwRadioOff)
return 0;
 
-
mutex_lock(>wx_mutex);
 
ret = rtllib_wx_get_scan(priv->rtllib, a, wrqu, b);
@@ -552,7 +545,6 @@ static int _rtl92e_wx_set_nick(struct net_device *dev,
memcpy(priv->nick, extra, wrqu->data.length);
mutex_unlock(>wx_mutex);
return 0;
-
 }
 
 static int _rtl92e_wx_get_nick(struct net_device *dev,
@@ -596,7 +588,6 @@ static int _rtl92e_wx_get_name(struct net_device *dev,
return rtllib_wx_get_name(priv->rtllib, info, wrqu, extra);
 }
 
-
 static int _rtl92e_wx_set_frag(struct net_device *dev,
   struct iw_request_info *info,
   union iwreq_data *wrqu, char *extra)
@@ -619,7 +610,6 @@ static int _rtl92e_wx_set_frag(struct net_device *dev,
return 0;
 }
 
-
 static int _rtl92e_wx_get_frag(struct net_device *dev,
   struct iw_request_info *info,
   union iwreq_data *wrqu, char *extra)
@@ -633,7 +623,6 @@ static int _rtl92e_wx_get_frag(struct net_device *dev,
return 0;
 }
 
-
 static int _rtl92e_wx_set_wap(struct net_device *dev,
  struct iw_request_info *info,
  union iwreq_data *awrq, char *extra)
@@ -651,10 +640,8 @@ static int _rtl92e_wx_set_wap(struct net_device *dev,
mutex_unlock(>wx_mutex);
 
return ret;
-
 }
 
-
 static int _rtl92e_wx_get_wap(struct net_device *dev,
  struct iw_request_info *info,
  union iwreq_data *wrqu, char *extra)
@@ -664,7 +651,6 @@ static int _rtl92e_wx_get_wap(struct net_device *dev,
return rtllib_wx_get_wap(priv->rtllib, info, wrqu, extra);
 }
 
-
 static int _rtl92e_wx_get_enc(struct net_device *dev,
  struct iw_request_info *info,
  union iwreq_data *wrqu, char *key)
@@ -707,7 +693,6 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,
ret = rtllib_wx_set_encode(priv->rtllib, info, wrqu, key);
mutex_unlock(>wx_mutex);
 
-
if (wrqu->encoding.flags & IW_ENCODE_DISABLED) {
ieee->pairwise_key_type = ieee->group_key_type = KEY_TYPE_NA;
rtl92e_cam_reset(dev);
@@ -716,7 +701,6 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,
goto end_hw_sec;
}
if (wrqu->encoding.length != 0) {
-
for (i = 0; i < 4; i++) {
hwkey[i] |=  key[4*i+0]
if (i == 1 && (4 * i + 1) == wrqu->encoding.length)
@@ -786,8 +770,6 @@ static int _rtl92e_wx_set_scan_type(struct net_device *dev,
return 1;
 }
 
-
-
 #define R8192_MAX_RETRY 255
 static int _rtl92e_wx_set_retry(struct net_device *dev,
struct iw_request_info *info,
@@ -833,7 +815,6 @@ static int _rtl92e_wx_get_retry(struct net_device *dev,
 {
struct r8192_priv *priv = rtllib_priv(

[PATCH 0/3] *** SUBJECT HERE ***

2018-03-01 Thread Dafna Hirschfeld
*** BLURB HERE ***

Dafna Hirschfeld (3):
  staging: rtl8192e: Fix issues regarding blank lines
  staging: rtl8192e: Remove unnecessary parentheses
  staging: rtl8192e: Add spaces around operators.

 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 51 +++---
 1 file changed, 12 insertions(+), 39 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html