[PATCH v3 06/10] staging: rtl8723bs: Add space after ','

2017-10-08 Thread Harsha Sharma
Space is required after ',' according to linux-kernel coding style.

Signed-off-by: Harsha Sharma 
---
Other patches from this patchset have already been merged and only
this one is remaining.
Changes in v3:
 -Change log message and rebase against staging-testing
Changes in v2:
 -Rebase against staging-testing and solve merge conflicts

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 51df42de9167..33e8098c34dd 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -45,7 +45,7 @@ static int rtw_soft_ap;
 static int rtw_power_mgnt = 1;
 static int rtw_ips_mode = IPS_NORMAL;
 module_param(rtw_ips_mode, int, 0644);
-MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
+MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_smart_ps = 2;
 
@@ -185,7 +185,7 @@ module_param(rtw_hw_wps_pbc, int, 0644);
 
 static uint rtw_max_roaming_times = 2;
 module_param(rtw_max_roaming_times, uint, 0644);
-MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
+MODULE_PARM_DESC(rtw_max_roaming_times, "The max roaming times to try");
 
 module_param(rtw_mc2u_disable, int, 0644);
 
@@ -206,10 +206,10 @@ static int rtw_tx_pwr_lmt_enable;
 static int rtw_tx_pwr_by_rate;
 
 module_param(rtw_tx_pwr_lmt_enable, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable,"0:Disable, 1:Enable, 2: Depend on 
efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 module_param(rtw_tx_pwr_by_rate, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_by_rate,"0:Disable, 1:Enable, 2: Depend on efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 char *rtw_phy_file_path = "";
 module_param(rtw_phy_file_path, charp, 0644);
@@ -224,10 +224,10 @@ MODULE_PARM_DESC(rtw_phy_file_path, "The path of phy 
parameter");
 /*  BIT6 - RF_TXPWR_LMT,   0: non-support, 1: support */
 static int rtw_load_phy_file = (BIT2 | BIT6);
 module_param(rtw_load_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_load_phy_file,"PHY File Bit Map");
+MODULE_PARM_DESC(rtw_load_phy_file, "PHY File Bit Map");
 static int rtw_decrypt_phy_file;
 module_param(rtw_decrypt_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_decrypt_phy_file,"Enable Decrypt PHY File");
+MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open (struct net_device *pnetdev);
-- 
2.11.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 06/10] staging: rtl8723bs: Add space after ','

2017-10-08 Thread Harsha Sharma
On Wed, Sep 13, 2017 at 2:11 AM, Greg KH  wrote:
> On Tue, Sep 12, 2017 at 07:05:23PM +0530, Harsha Sharma wrote:
>> Space required after ','
>>
>> Signed-off-by: Harsha Sharma 
>> ---
>> Changes in v2:
>>  -Rebase against staging-testing and solve merge conflicts
>>
>>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
>>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> Where are the rest of the patches in this series, I only seem to have 2
> (patch 6 and patch 7 out of 10.)
>
> If you have to resend patches, please always do so as a unique series,
> If I have taken some of a previous series, please then send the new ones
> out as a totally unique series, as that is what they now are.
>
> Remember, make it totally obvious what I, as a maintainer, need to do
> here.  I have no memory of previous patch submissions, or what happened
> on something else somewhere else.  I deal with thousands of patches, and
> as such, have no short-term memory :)
>
Hi,
The other patches in this series have already been merged and only this one is
remaining, so should I still send whole patchset again or this patch can be
merged ?
Thanks for your time.

Regards,
Harsha Sharma

> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: iio: trigger: Move header file content to source file

2017-09-26 Thread Harsha Sharma
The contents of the header file are used only by this single source file.
Moved content into iio-trig-bfin-timer.c and removed iio-trig-bfin-timer.h

Signed-off-by: Harsha Sharma 
---
 drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 20 ++-
 drivers/staging/iio/trigger/iio-trig-bfin-timer.h | 24 ---
 2 files changed, 19 insertions(+), 25 deletions(-)
 delete mode 100644 drivers/staging/iio/trigger/iio-trig-bfin-timer.h

diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c 
b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
index d80dcf8..2cedcaf 100644
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
+++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@ -19,7 +19,25 @@
 #include 
 #include 
 
-#include "iio-trig-bfin-timer.h"
+/**
+ * struct iio_bfin_timer_trigger_pdata - timer trigger platform data
+ * @output_enable: Enable external trigger pulse generation.
+ * @active_low: Whether the trigger pulse is active low.
+ * @duty_ns: Length of the trigger pulse in nanoseconds.
+ *
+ * This struct is used to configure the output pulse generation of the blackfin
+ * timer trigger. If output_enable is set to true an external trigger signal
+ * will generated on the pin corresponding to the timer. This is useful for
+ * converters which needs an external signal to start conversion. active_low 
and
+ * duty_ns are used to configure the type of the trigger pulse. If 
output_enable
+ * is set to false no external trigger pulse will be generated and active_low
+ * and duty_ns are ignored.
+ **/
+struct iio_bfin_timer_trigger_pdata {
+bool output_enable;
+bool active_low;
+unsigned int duty_ns;
+};
 
 struct bfin_timer {
unsigned short id, bit;
diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.h 
b/drivers/staging/iio/trigger/iio-trig-bfin-timer.h
deleted file mode 100644
index c07321f..000
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __IIO_BFIN_TIMER_TRIGGER_H__
-#define __IIO_BFIN_TIMER_TRIGGER_H__
-
-/**
- * struct iio_bfin_timer_trigger_pdata - timer trigger platform data
- * @output_enable: Enable external trigger pulse generation.
- * @active_low: Whether the trigger pulse is active low.
- * @duty_ns: Length of the trigger pulse in nanoseconds.
- *
- * This struct is used to configure the output pulse generation of the blackfin
- * timer trigger. If output_enable is set to true an external trigger signal
- * will generated on the pin corresponding to the timer. This is useful for
- * converters which needs an external signal to start conversion. active_low 
and
- * duty_ns are used to configure the type of the trigger pulse. If 
output_enable
- * is set to false no external trigger pulse will be generated and active_low
- * and duty_ns are ignored.
- **/
-struct iio_bfin_timer_trigger_pdata {
-   bool output_enable;
-   bool active_low;
-   unsigned int duty_ns;
-};
-
-#endif
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: vc04_services: Remove typedef struct

2017-09-22 Thread Harsha Sharma
Remove typedef from struct as linux-kernel coding style tends to
avoid using typedefs

Done using following coccinelle semantic patch

@r1@
type T;
@@

typedef struct { ... } T;

@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t" or T[-2:] == "_T":
coccinelle.T2 = T[:-2];
else:
coccinelle.T2 = T;

print T, coccinelle.T2

@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;

@r3@
type r1.T;
identifier c1.T2;
@@
-T
+struct T2

Signed-off-by: Harsha Sharma 
---
Changes in v2:
 -Convert structure name to lowercase

 .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 44 +++---
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
index 8af95fc..2c09d5e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -41,14 +41,14 @@
 
 #define vchiq_status_to_vchi(status) ((int32_t)status)
 
-typedef struct {
+struct shim_service {
VCHIQ_SERVICE_HANDLE_T handle;
 
VCHIU_QUEUE_T queue;
 
VCHI_CALLBACK_T callback;
void *callback_param;
-} SHIM_SERVICE_T;
+};
 
 /* --
  * return pointer to the mphi message driver function table
@@ -99,7 +99,7 @@ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
uint32_t *msg_size,
VCHI_FLAGS_T flags)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -131,7 +131,7 @@ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
  ***/
 int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_HEADER_T *header;
 
header = vchiu_queue_pop(&service->queue);
@@ -163,7 +163,7 @@ int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle,
void *context,
uint32_t data_size)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_STATUS_T status;
 
while (1) {
@@ -262,7 +262,7 @@ int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T 
handle,
VCHI_FLAGS_T flags,
void *bulk_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_BULK_MODE_T mode;
VCHIQ_STATUS_T status;
 
@@ -322,7 +322,7 @@ int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T 
handle,
VCHI_FLAGS_T flags,
void *bulk_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_BULK_MODE_T mode;
VCHIQ_STATUS_T status;
 
@@ -384,7 +384,7 @@ int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle,
uint32_t *actual_msg_size,
VCHI_FLAGS_T flags)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -458,7 +458,7 @@ int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
VCHI_FLAGS_T flags,
VCHI_HELD_MSG_T *message_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct shim_service *service = (struct shim_service *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -579,8 +579,8 @@ int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle)
 static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
VCHIQ_HEADER_T *header, VCHIQ_SERVICE_HANDLE_T handle, void *bulk_user)
 {
-   SHIM_SERVICE_T *service =
-   (SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle);
+   struct shim_service *service =
+   (struct shim_service *)VCHIQ_GET_SERVICE_USERDATA(handle);
 
if (!service->callback)
goto release;
@@ -637,10 +637,10 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
return VCHIQ_SUCCESS;
 }
 
-static SHIM_SERVICE_T *service_alloc(VCHIQ_INSTANCE_T instance,
+static struct shim_service *service_alloc(VCHIQ_INSTANCE_T instance,
SERVICE_CREATION_T *setup)
 {
-   SHIM_SERVICE_T *service = kzalloc(sizeof(SHIM_SERVICE_T), GFP_KERNEL);
+   struct shim_service *service = kzalloc(sizeof(struct shim_service), 
GFP_KERNEL);
 
(void)instance;
 
@@ -657,7 +657,7 @@ static SHIM_SERVICE_T *service_alloc(VCHIQ_INSTANCE_T 
instance,
r

[PATCH] staging: vc04_services: Remove typedef struct

2017-09-21 Thread Harsha Sharma
Remove typedef from struct as linux-kernel coding style tends to
avoid using typedefs

Done using following coccinelle semantic patch

@r1@
type T;
@@

typedef struct { ... } T;

@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_t" or T[-2:] == "_T":
coccinelle.T2 = T[:-2];
else:
coccinelle.T2 = T;

print T, coccinelle.T2

@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;

@r3@
type r1.T;
identifier c1.T2;
@@
-T
+struct T2

Signed-off-by: Harsha Sharma 
---
 .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 44 +++---
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
index 8af95fc..adb602d 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -41,14 +41,14 @@
 
 #define vchiq_status_to_vchi(status) ((int32_t)status)
 
-typedef struct {
+struct SHIM_SERVICE {
VCHIQ_SERVICE_HANDLE_T handle;
 
VCHIU_QUEUE_T queue;
 
VCHI_CALLBACK_T callback;
void *callback_param;
-} SHIM_SERVICE_T;
+};
 
 /* --
  * return pointer to the mphi message driver function table
@@ -99,7 +99,7 @@ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
uint32_t *msg_size,
VCHI_FLAGS_T flags)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -131,7 +131,7 @@ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle,
  ***/
 int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_HEADER_T *header;
 
header = vchiu_queue_pop(&service->queue);
@@ -163,7 +163,7 @@ int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle,
void *context,
uint32_t data_size)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_STATUS_T status;
 
while (1) {
@@ -262,7 +262,7 @@ int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T 
handle,
VCHI_FLAGS_T flags,
void *bulk_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_BULK_MODE_T mode;
VCHIQ_STATUS_T status;
 
@@ -322,7 +322,7 @@ int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T 
handle,
VCHI_FLAGS_T flags,
void *bulk_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_BULK_MODE_T mode;
VCHIQ_STATUS_T status;
 
@@ -384,7 +384,7 @@ int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle,
uint32_t *actual_msg_size,
VCHI_FLAGS_T flags)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -458,7 +458,7 @@ int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
VCHI_FLAGS_T flags,
VCHI_HELD_MSG_T *message_handle)
 {
-   SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
+   struct SHIM_SERVICE *service = (struct SHIM_SERVICE *)handle;
VCHIQ_HEADER_T *header;
 
WARN_ON((flags != VCHI_FLAGS_NONE) &&
@@ -579,8 +579,8 @@ int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle)
 static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
VCHIQ_HEADER_T *header, VCHIQ_SERVICE_HANDLE_T handle, void *bulk_user)
 {
-   SHIM_SERVICE_T *service =
-   (SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle);
+   struct SHIM_SERVICE *service =
+   (struct SHIM_SERVICE *)VCHIQ_GET_SERVICE_USERDATA(handle);
 
if (!service->callback)
goto release;
@@ -637,10 +637,10 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
return VCHIQ_SUCCESS;
 }
 
-static SHIM_SERVICE_T *service_alloc(VCHIQ_INSTANCE_T instance,
+static struct SHIM_SERVICE *service_alloc(VCHIQ_INSTANCE_T instance,
SERVICE_CREATION_T *setup)
 {
-   SHIM_SERVICE_T *service = kzalloc(sizeof(SHIM_SERVICE_T), GFP_KERNEL);
+   struct SHIM_SERVICE *service = kzalloc(sizeof(struct SHIM_SERVICE), 
GFP_KERNEL);
 
(void)instance;
 
@@ -657,7 +657,7 @@ static SHIM_SERVICE_T *service_alloc(VCHIQ_INSTANCE_T 
instance,
return service;
 }
 
-static void service_free(SHIM_SERVI

[PATCH] staging: rtlwifi: delete double assignment

2017-09-15 Thread Harsha Sharma
Remove two adjacent assignments to the same location.
In practice, many such occurences are intentional but
this case don't seem to fall into that category.
Done using following coccinelle semantic patch

@@
expression e1,e2,e3;
@@

(
 (<+...e1++...+>)=e2;
|
 (<+...e1--...+>)=e2;
|
 (<+...++e1...+>)=e2;
|
 (<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtlwifi/base.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index b88b0e8..68bd124 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -1536,7 +1536,6 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct 
sk_buff *skb, u8 is_tx,
/* EAPOL is seen as in-4way */
rtlpriv->btcoexist.btc_info.in_4way = true;
rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
-   rtlpriv->btcoexist.btc_info.in_4way_ts = jiffies;
 
RT_TRACE(rtlpriv, (COMP_SEND | COMP_RECV), DBG_DMESG,
 "802.1X %s EAPOL pkt!!\n", (is_tx) ? "Tx" : "Rx");
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Remove unused variable ret

2017-09-14 Thread Harsha Sharma
Remove unused variable ret as it is not used anywhere.
Remove multiple blank lines.
Done using following coccinelle semantic patch

@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index ffbb35a..7935dc5 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2337,10 +2337,6 @@ static int rtw_wx_read32(struct net_device *dev,
u32 data32;
u32 bytes;
u8 *ptmp;
-   int ret;
-
-
-   ret = 0;
padapter = (struct adapter *)rtw_netdev_priv(dev);
p = &wrqu->data;
len = p->length;
@@ -2352,7 +2348,6 @@ static int rtw_wx_read32(struct net_device *dev,
return -ENOMEM;
 
if (copy_from_user(ptmp, p->pointer, len)) {
-   ret = -EFAULT;
goto exit;
}
 
@@ -2375,7 +2370,6 @@ static int rtw_wx_read32(struct net_device *dev,
break;
default:
DBG_871X(KERN_INFO "%s: usage> read 
[bytes],[address(hex)]\n", __func__);
-   ret = -EINVAL;
goto exit;
}
DBG_871X(KERN_INFO "%s: addr = 0x%08X data =%s\n", __func__, addr, 
extra);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Merge assignment with return

2017-09-14 Thread Harsha Sharma
Merge assignment with return statement to directly return the value.
Done using following coccinelle semantic patch

@@
local idexpression ret;
expression e;
@@

-ret =
+return
 e;
-return ret;

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 20 
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index ffbb35a..6a8f805 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2123,12 +2123,9 @@ static int rtw_wx_set_gen_ie(struct net_device *dev,
 struct iw_request_info *info,
 union iwreq_data *wrqu, char *extra)
 {
-   int ret;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
 
-   ret = rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
-
-   return ret;
+   return rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
 }
 
 static int rtw_wx_set_auth(struct net_device *dev,
@@ -3857,7 +3854,6 @@ static int rtw_hostapd_sta_flush(struct net_device *dev)
 {
/* _irqL irqL; */
/* struct list_head *phead, *plist; */
-   int ret = 0;
/* struct sta_info *psta = NULL; */
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
/* struct sta_priv *pstapriv = &padapter->stapriv; */
@@ -3866,9 +3862,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev)
 
flush_all_cam_entry(padapter);  /* clear CAM */
 
-   ret = rtw_sta_flush(padapter);
-
-   return ret;
+   return rtw_sta_flush(padapter);
 
 }
 
@@ -4266,7 +4260,6 @@ static int rtw_set_hidden_ssid(struct net_device *dev, 
struct ieee_param *param,
 
 static int rtw_ioctl_acl_remove_sta(struct net_device *dev, struct ieee_param 
*param, int len)
 {
-   int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
@@ -4279,15 +4272,12 @@ static int rtw_ioctl_acl_remove_sta(struct net_device 
*dev, struct ieee_param *p
return -EINVAL;
}
 
-   ret = rtw_acl_remove_sta(padapter, param->sta_addr);
-
-   return ret;
+   return rtw_acl_remove_sta(padapter, param->sta_addr);
 
 }
 
 static int rtw_ioctl_acl_add_sta(struct net_device *dev, struct ieee_param 
*param, int len)
 {
-   int ret = 0;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
 
@@ -4300,9 +4290,7 @@ static int rtw_ioctl_acl_add_sta(struct net_device *dev, 
struct ieee_param *para
return -EINVAL;
}
 
-   ret = rtw_acl_add_sta(padapter, param->sta_addr);
-
-   return ret;
+   return rtw_acl_add_sta(padapter, param->sta_addr);
 
 }
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 06/10] staging: rtl8723bs: Add space after ','

2017-09-12 Thread Harsha Sharma
Space required after ','

Signed-off-by: Harsha Sharma 
---
Changes in v2:
 -Rebase against staging-testing and solve merge conflicts

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index b3635e2..22b9e1e 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -45,7 +45,7 @@
 static int rtw_power_mgnt = 1;
 static int rtw_ips_mode = IPS_NORMAL;
 module_param(rtw_ips_mode, int, 0644);
-MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
+MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_smart_ps = 2;
 
@@ -185,7 +185,7 @@
 
 static uint rtw_max_roaming_times = 2;
 module_param(rtw_max_roaming_times, uint, 0644);
-MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
+MODULE_PARM_DESC(rtw_max_roaming_times, "The max roaming times to try");
 
 module_param(rtw_mc2u_disable, int, 0644);
 
@@ -206,10 +206,10 @@
 static int rtw_tx_pwr_by_rate;
 
 module_param(rtw_tx_pwr_lmt_enable, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable,"0:Disable, 1:Enable, 2: Depend on 
efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 module_param(rtw_tx_pwr_by_rate, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_by_rate,"0:Disable, 1:Enable, 2: Depend on efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 char *rtw_phy_file_path = "";
 module_param(rtw_phy_file_path, charp, 0644);
@@ -224,10 +224,10 @@
 /*  BIT6 - RF_TXPWR_LMT,   0: non-support, 1: support */
 static int rtw_load_phy_file = (BIT2 | BIT6);
 module_param(rtw_load_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_load_phy_file,"PHY File Bit Map");
+MODULE_PARM_DESC(rtw_load_phy_file, "PHY File Bit Map");
 static int rtw_decrypt_phy_file;
 module_param(rtw_decrypt_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_decrypt_phy_file,"Enable Decrypt PHY File");
+MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open (struct net_device *pnetdev);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Remove unnecessary spaces

2017-09-12 Thread Harsha Sharma
Space between function name and open parentheses '(' is prohibited.
Space is required around most binary operators '=', '==', '+=',
'<', ':', '+', '-'
Space required before '&', '*'
Space is required after ',', ';'

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 30 +--
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c 
b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
index 80ca2d7..49cb701 100644
--- a/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/mlme_linux.c
@@ -19,7 +19,7 @@
 #include 
 #include 
 
-static void _dynamic_check_timer_handlder (void *FunctionContext)
+static void _dynamic_check_timer_handlder(void *FunctionContext)
 {
struct adapter *adapter = FunctionContext;
 
@@ -51,8 +51,8 @@ void rtw_os_indicate_connect(struct adapter *adapter)
 {
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
 
-   if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ==true) ||
-   (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ==true))
+   if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
+   (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true))
{
rtw_cfg80211_ibss_indicate_connect(adapter);
}
@@ -99,7 +99,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)
/* reset RX BIP packet number */
pmlmeext->mgnt_80211w_IPN_rx = 0;
 
-   memset((unsigned char *)&adapter->securitypriv, 0, sizeof 
(struct security_priv));
+   memset((unsigned char *)&adapter->securitypriv, 0, 
sizeof(struct security_priv));
 
/*  Added by Albert 2009/02/18 */
/*  Restore the PMK information to securitypriv structure for 
the following connection. */
@@ -116,9 +116,9 @@ void rtw_reset_securitypriv(struct adapter *adapter)
{
/* if (adapter->mlmepriv.fw_state & WIFI_STATION_STATE) */
/*  */
-   struct security_priv *psec_priv =&adapter->securitypriv;
+   struct security_priv *psec_priv = &adapter->securitypriv;
 
-   psec_priv->dot11AuthAlgrthm =dot11AuthAlgrthm_Open;  /* open 
system */
+   psec_priv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;  /* open 
system */
psec_priv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
psec_priv->dot11PrivacyKeyIndex = 0;
 
@@ -150,7 +150,7 @@ void rtw_os_indicate_disconnect(struct adapter *adapter)
 void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 {
uintlen;
-   u8 *buff,*p, i;
+   u8 *buff, *p, i;
union iwreq_data wrqu;
 
RT_TRACE(_module_mlme_osdep_c_, _drv_info_, ("+rtw_report_sec_ie, 
authmode =%d\n", authmode));
@@ -168,22 +168,22 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 
authmode, u8 *sec_ie)
}
p = buff;
 
-   p+=sprintf(p,"ASSOCINFO(ReqIEs =");
+   p += sprintf(p, "ASSOCINFO(ReqIEs =");
 
-   len = sec_ie[1]+2;
-   len = (len < IW_CUSTOM_MAX) ? len:IW_CUSTOM_MAX;
+   len = sec_ie[1] + 2;
+   len = (len < IW_CUSTOM_MAX) ? len : IW_CUSTOM_MAX;
 
-   for (i = 0;ihttp://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3 07/10] staging: rtl8723bs: Remove unnecessary space

2017-09-12 Thread Harsha Sharma
Remove space between function name and open parenthesis '('
Remove space before ';', '++', ','

Signed-off-by: Harsha Sharma 
---
Change in v3:
 -Fix small spelling mistake
Change in v2:
 -Merge patches 07/10 and 08/10

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index eb21821..61be2b8 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -235,8 +235,8 @@
 MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
-int netdev_open (struct net_device *pnetdev);
-static int netdev_close (struct net_device *pnetdev);
+int netdev_open(struct net_device *pnetdev);
+static int netdev_close(struct net_device *pnetdev);
 
 static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev)
 {
@@ -258,7 +258,7 @@ static uint loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
if (registry_par->channel > 14)
registry_par->channel = 1;
 
-   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
+   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense;
registry_par->vcs_type = (u8)rtw_vcs_type;
registry_par->rts_thresh = (u16)rtw_rts_thresh;
registry_par->frag_thresh = (u16)rtw_frag_thresh;
@@ -607,7 +607,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
return _status;
 }
 
-void rtw_stop_drv_threads (struct adapter *padapter)
+void rtw_stop_drv_threads(struct adapter *padapter)
 {
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_stop_drv_threads\n"));
 
@@ -1228,7 +1228,7 @@ void rtw_dev_unload(struct adapter *padapter)
DBG_871X("stop cmdthd timeout\n");
break;
} else {
-   cnt ++;
+   cnt++;
DBG_871X("cmdthd is running(%d)\n", cnt);
msleep(10);
}
@@ -1879,7 +1879,7 @@ int rtw_resume_common(struct adapter *padapter)
pwrpriv->pno_in_resume = false;
#endif
}
-   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__ , ret,
+   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__, ret,
jiffies_to_msecs(jiffies - start_time));
 
return ret;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 07/10] staging: rtl8723bs: Remove unneccesary space

2017-09-12 Thread Harsha Sharma
Remove space between function name and open parenthesis '('
Remove space before ';', '++', ','

Signed-off-by: Harsha Sharma 
---
Change in v2:
 -Merge patches 07/10 and 08/10

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index eb21821..61be2b8 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -235,8 +235,8 @@
 MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
-int netdev_open (struct net_device *pnetdev);
-static int netdev_close (struct net_device *pnetdev);
+int netdev_open(struct net_device *pnetdev);
+static int netdev_close(struct net_device *pnetdev);
 
 static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev)
 {
@@ -258,7 +258,7 @@ static uint loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
if (registry_par->channel > 14)
registry_par->channel = 1;
 
-   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
+   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense;
registry_par->vcs_type = (u8)rtw_vcs_type;
registry_par->rts_thresh = (u16)rtw_rts_thresh;
registry_par->frag_thresh = (u16)rtw_frag_thresh;
@@ -607,7 +607,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
return _status;
 }
 
-void rtw_stop_drv_threads (struct adapter *padapter)
+void rtw_stop_drv_threads(struct adapter *padapter)
 {
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_stop_drv_threads\n"));
 
@@ -1228,7 +1228,7 @@ void rtw_dev_unload(struct adapter *padapter)
DBG_871X("stop cmdthd timeout\n");
break;
} else {
-   cnt ++;
+   cnt++;
DBG_871X("cmdthd is running(%d)\n", cnt);
msleep(10);
}
@@ -1879,7 +1879,7 @@ int rtw_resume_common(struct adapter *padapter)
pwrpriv->pno_in_resume = false;
#endif
}
-   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__ , ret,
+   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__, ret,
jiffies_to_msecs(jiffies - start_time));
 
return ret;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] staging: rtl8723bs: Change coding style to (foo *bar)

2017-09-11 Thread Harsha Sharma
This coding style (foo *bar) is more common for the kernel code.
Change foo* bar to foo *bar.
Change foo * bar to foo *bar.
Change (foo*) to (foo *).

Signed-off-by: Harsha Sharma 
---
Change in v3:
 -Rebase against staging-testing branch
Change in v2:
 -Updated log message and subject
 
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index b3635e2..f509713 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -142,11 +142,11 @@
 #endif
 module_param(rtw_qos_opt_enable, int, 0644);
 
-static char* ifname = "wlan%d";
+static char *ifname = "wlan%d";
 module_param(ifname, charp, 0644);
 MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
 
-char* rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
+char *rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
 
 module_param(rtw_initmac, charp, 0644);
 module_param(rtw_channel_plan, int, 0644);
@@ -456,7 +456,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
return rtw_1d_to_queue[priority];
 }
 
-static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long 
state, void *ptr)
+static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long 
state, void *ptr)
 {
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 
@@ -619,7 +619,7 @@ void rtw_stop_drv_threads (struct adapter *padapter)
 static u8 rtw_init_default_value(struct adapter *padapter)
 {
u8 ret  = _SUCCESS;
-   struct registry_priv* pregistrypriv = &padapter->registrypriv;
+   struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/10] staging: rtl8723bs: Remove unnecessary blank lines

2017-09-10 Thread Harsha Sharma
Blank lines aren't necessary after an open brace and before a close brace

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index fb8502a..5cca7a9 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -454,7 +454,6 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
}
 
return rtw_1d_to_queue[priority];
-
 }
 
 static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long 
state, void *ptr)
@@ -1024,7 +1023,6 @@ int _netdev_open(struct net_device *pnetdev)
DBG_871X("-871x_drv - drv_open fail, bup =%d\n", padapter->bup);
 
return (-1);
-
 }
 
 int netdev_open(struct net_device *pnetdev)
@@ -1091,7 +1089,6 @@ int rtw_ips_pwr_up(struct adapter *padapter)
 
DBG_871X("<===  rtw_ips_pwr_up..\n");
return result;
-
 }
 
 void rtw_ips_pwr_down(struct adapter *padapter)
@@ -1113,7 +1110,6 @@ void rtw_ips_dev_unload(struct adapter *padapter)
 
if (padapter->bSurpriseRemoved == false)
rtw_hal_deinit(padapter);
-
 }
 
 
@@ -1186,7 +1182,6 @@ static int netdev_close(struct net_device *pnetdev)
DBG_871X("-871x_drv - drv_close, bup =%d\n", padapter->bup);
 
return 0;
-
 }
 
 void rtw_ndev_destructor(struct net_device *ndev)
@@ -1390,7 +1385,6 @@ int rtw_suspend_wow(struct adapter *padapter)
DBG_871X_LEVEL(_drv_always_, "%s: pno: %d\n", __func__, 
pwrpriv->wowlan_pno_enable);
else
rtw_set_ps_mode(padapter, PS_MODE_DTIM, 0, 0, "WOWLAN");
-
}
else {
DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR ### wowlan_mode 
=%d\n", __func__, pwrpriv->wowlan_mode);
@@ -1470,7 +1464,6 @@ static int rtw_suspend_normal(struct adapter *padapter)
if ((rtw_hal_check_ips_status(padapter) == true)
|| (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off)) {
DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR  driver in IPS 
ERROR###!!!\n", __func__);
-
}
 
rtw_dev_unload(padapter);
@@ -1644,7 +1637,6 @@ int rtw_resume_process_wow(struct adapter *padapter)
}
}
else {
-
DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR ### wowlan_mode 
=%d\n", __func__, pwrpriv->wowlan_mode);
}
 
@@ -1657,7 +1649,6 @@ int rtw_resume_process_wow(struct adapter *padapter)
if (pwrpriv->wowlan_wake_reason == FWDecisionDisconnect ||
pwrpriv->wowlan_wake_reason == Rx_DisAssoc ||
pwrpriv->wowlan_wake_reason == Rx_DeAuth) {
-
DBG_871X("%s: disconnect reason: %02x\n", __func__,
pwrpriv->wowlan_wake_reason);
rtw_indicate_disconnect(padapter);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/10] staging: rtl8723bs: Remove unneccesary braces and change position of open brace

2017-09-10 Thread Harsha Sharma
Follow linux-kernel code style for conditional statements

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 63 +
 1 file changed, 19 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 7a2d088..fb8502a 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -351,8 +351,7 @@ static int rtw_net_set_mac_address(struct net_device 
*pnetdev, void *p)
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
struct sockaddr *addr = p;
 
-   if (padapter->bup == false)
-   {
+   if (padapter->bup == false) {
/* DBG_871X("r8711_net_set_mac_address(), MAC 
=%x:%x:%x:%x:%x:%x\n", addr->sa_data[0], addr->sa_data[1], addr->sa_data[2], 
addr->sa_data[3], */
/* addr->sa_data[4], addr->sa_data[5]); */
memcpy(padapter->eeprompriv.mac_addr, addr->sa_data, ETH_ALEN);
@@ -425,9 +424,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct 
sk_buff *skb
skb->priority = rtw_classify8021d(skb);
 
if (pmlmepriv->acm_mask != 0)
-   {
skb->priority = qos_acm(pmlmepriv->acm_mask, skb->priority);
-   }
 
return rtw_1d_to_queue[skb->priority];
 }
@@ -1036,8 +1033,7 @@ int netdev_open(struct net_device *pnetdev)
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
 
-   if (pwrctrlpriv->bInSuspend == true)
-   {
+   if (pwrctrlpriv->bInSuspend == true) {
DBG_871X("+871x_drv - drv_open, bInSuspend =%d\n", 
pwrctrlpriv->bInSuspend);
return 0;
}
@@ -1066,16 +1062,13 @@ static int  ips_netdrv_open(struct adapter *padapter)
/* padapter->bup = true; */
 
status = rtw_hal_init(padapter);
-   if (status == _FAIL)
-   {
+   if (status == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_, ("ips_netdrv_open(): 
Can't init h/w!\n"));
goto netdev_open_error;
}
 
if (padapter->intf_start)
-   {
padapter->intf_start(padapter);
-   }
 
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
 
@@ -1119,9 +1112,7 @@ void rtw_ips_dev_unload(struct adapter *padapter)
 
 
if (padapter->bSurpriseRemoved == false)
-   {
rtw_hal_deinit(padapter);
-   }
 
 }
 
@@ -1132,8 +1123,7 @@ static int pm_netdev_open(struct net_device *pnetdev, u8 
bnormal)
 
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
 
-   if (true == bnormal)
-   {
+   if (true == bnormal) {
if 
(mutex_lock_interruptible(&(adapter_to_dvobj(padapter)->hw_init_mutex)) == 0) {
status = _netdev_open(pnetdev);

mutex_unlock(&(adapter_to_dvobj(padapter)->hw_init_mutex));
@@ -1152,8 +1142,7 @@ static int netdev_close(struct net_device *pnetdev)
 
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+871x_drv - drv_close\n"));
 
-   if (pwrctl->bInternalAutoSuspend == true)
-   {
+   if (pwrctl->bInternalAutoSuspend == true) {
/* rtw_pwr_wakeup(padapter); */
if (pwrctl->rf_pwrstate == rf_off)
pwrctl->ps_flag = true;
@@ -1174,8 +1163,7 @@ static int netdev_close(struct net_device *pnetdev)
DBG_871X("(2)871x_drv - drv_close, bup =%d, hw_init_completed 
=%d\n", padapter->bup, padapter->hw_init_completed);
 
/* s1. */
-   if (pnetdev)
-   {
+   if (pnetdev) {
if (!rtw_netif_queue_stopped(pnetdev))
rtw_netif_stop_queue(pnetdev);
}
@@ -1219,8 +1207,7 @@ void rtw_dev_unload(struct adapter *padapter)
 
RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+%s\n", __func__));
 
-   if (padapter->bup == true)
-   {
+   if (padapter->bup == true) {
DBG_871X("===> %s\n", __func__);
 
padapter->bDriverStopped = true;
@@ -1257,8 +1244,7 @@ void rtw_dev_unload(struct adapter *padapter)
DBG_871X_LEVEL(_drv_always_, "%s: driver not in IPS\n", 
__func__);
}
 
-   if (padapter->bSurpriseRemoved == false)
-   {
+   if (padapter->bSurpriseRemoved == false) {
rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req);
 #ifdef CONFIG_WOWLAN
if (pwrctl->bSupportRemoteWakeup == true &&a

[PATCH 08/10] staging: rtl8723bs: Remove unnecessary space

2017-09-10 Thread Harsha Sharma
Remove space before ';', '++', ','

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 8e13fb3..7a2d088 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -253,7 +253,7 @@ static uint loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
if (registry_par->channel > 14)
registry_par->channel = 1;
 
-   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
+   registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense;
registry_par->vcs_type = (u8)rtw_vcs_type;
registry_par->rts_thresh = (u16)rtw_rts_thresh;
registry_par->frag_thresh = (u16)rtw_frag_thresh;
@@ -1240,7 +1240,7 @@ void rtw_dev_unload(struct adapter *padapter)
DBG_871X("stop cmdthd timeout\n");
break;
} else {
-   cnt ++;
+   cnt++;
DBG_871X("cmdthd is running(%d)\n", cnt);
msleep(10);
}
@@ -1907,7 +1907,7 @@ int rtw_resume_common(struct adapter *padapter)
pwrpriv->pno_in_resume = false;
#endif
}
-   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__ , ret,
+   DBG_871X_LEVEL(_drv_always_, "%s:%d in %d ms\n", __func__, ret,
jiffies_to_msecs(jiffies - start_time));
 
return ret;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/10] staging: rtl8723bs: Removed unneccesary space

2017-09-10 Thread Harsha Sharma
Remove space between function name and open parenthesis '('

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index ecb01cf..8e13fb3 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -230,8 +230,8 @@
 MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
-int netdev_open (struct net_device *pnetdev);
-static int netdev_close (struct net_device *pnetdev);
+int netdev_open(struct net_device *pnetdev);
+static int netdev_close(struct net_device *pnetdev);
 
 static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev)
 {
@@ -606,7 +606,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
return _status;
 }
 
-void rtw_stop_drv_threads (struct adapter *padapter)
+void rtw_stop_drv_threads(struct adapter *padapter)
 {
RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_stop_drv_threads\n"));
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/10] staging: rtl8723bs: Add space after ','

2017-09-10 Thread Harsha Sharma
Space required after ','

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index b320df8..ecb01cf 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -45,7 +45,7 @@
 static int rtw_power_mgnt = 1;
 static int rtw_ips_mode = IPS_NORMAL;
 module_param(rtw_ips_mode, int, 0644);
-MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
+MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
 
 static int rtw_smart_ps = 2;
 
@@ -185,7 +185,7 @@
 
 static uint rtw_max_roaming_times = 2;
 module_param(rtw_max_roaming_times, uint, 0644);
-MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
+MODULE_PARM_DESC(rtw_max_roaming_times, "The max roaming times to try");
 
 module_param(rtw_mc2u_disable, int, 0644);
 
@@ -206,10 +206,10 @@
 static int rtw_tx_pwr_by_rate = 0;
 
 module_param(rtw_tx_pwr_lmt_enable, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable,"0:Disable, 1:Enable, 2: Depend on 
efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_lmt_enable, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 module_param(rtw_tx_pwr_by_rate, int, 0644);
-MODULE_PARM_DESC(rtw_tx_pwr_by_rate,"0:Disable, 1:Enable, 2: Depend on efuse");
+MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on 
efuse");
 
 char *rtw_phy_file_path = "";
 module_param(rtw_phy_file_path, charp, 0644);
@@ -224,10 +224,10 @@
 /*  BIT6 - RF_TXPWR_LMT,   0: non-support, 1: support */
 static int rtw_load_phy_file = (BIT2 | BIT6);
 module_param(rtw_load_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_load_phy_file,"PHY File Bit Map");
+MODULE_PARM_DESC(rtw_load_phy_file, "PHY File Bit Map");
 static int rtw_decrypt_phy_file = 0;
 module_param(rtw_decrypt_phy_file, int, 0644);
-MODULE_PARM_DESC(rtw_decrypt_phy_file,"Enable Decrypt PHY File");
+MODULE_PARM_DESC(rtw_decrypt_phy_file, "Enable Decrypt PHY File");
 
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open (struct net_device *pnetdev);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/10] staging: rtl8723bs: Add space between concatenated strings

2017-09-10 Thread Harsha Sharma
Use spaces between concatenated strings

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 50 ++---
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 97ff3ab..b320df8 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -467,7 +467,7 @@ static int rtw_ndev_notifier_call(struct notifier_block * 
nb, unsigned long stat
if (dev->netdev_ops->ndo_do_ioctl != rtw_ioctl)
return NOTIFY_DONE;
 
-   DBG_871X_LEVEL(_drv_info_, FUNC_NDEV_FMT" state:%lu\n", 
FUNC_NDEV_ARG(dev), state);
+   DBG_871X_LEVEL(_drv_info_, FUNC_NDEV_FMT " state:%lu\n", 
FUNC_NDEV_ARG(dev), state);
 
switch (state) {
case NETDEV_CHANGENAME:
@@ -497,7 +497,7 @@ static int rtw_ndev_init(struct net_device *dev)
 {
struct adapter *adapter = rtw_netdev_priv(dev);
 
-   DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(adapter));
+   DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT "\n", 
FUNC_ADPT_ARG(adapter));
strncpy(adapter->old_ifname, dev->name, IFNAMSIZ);
rtw_adapter_proc_init(dev);
 
@@ -508,7 +508,7 @@ static void rtw_ndev_uninit(struct net_device *dev)
 {
struct adapter *adapter = rtw_netdev_priv(dev);
 
-   DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(adapter));
+   DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT "\n", 
FUNC_ADPT_ARG(adapter));
rtw_adapter_proc_deinit(dev);
 }
 
@@ -984,7 +984,7 @@ int _netdev_open(struct net_device *pnetdev)
goto netdev_open_error;
}
 
-   DBG_871X("MAC Address = "MAC_FMT"\n", 
MAC_ARG(pnetdev->dev_addr));
+   DBG_871X("MAC Address = " MAC_FMT "\n", 
MAC_ARG(pnetdev->dev_addr));
 
status = rtw_start_drv_threads(padapter);
if (status == _FAIL) {
@@ -1203,7 +1203,7 @@ static int netdev_close(struct net_device *pnetdev)
 
 void rtw_ndev_destructor(struct net_device *ndev)
 {
-   DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
+   DBG_871X(FUNC_NDEV_FMT "\n", FUNC_NDEV_ARG(ndev));
 
if (ndev->ieee80211_ptr)
kfree((u8 *)ndev->ieee80211_ptr);
@@ -1292,7 +1292,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter 
*padapter)
 {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-   DBG_871X("==> "FUNC_ADPT_FMT" entry\n", FUNC_ADPT_ARG(padapter));
+   DBG_871X("==> " FUNC_ADPT_FMT " entry\n", FUNC_ADPT_ARG(padapter));
 
if (rtw_chk_roam_flags(padapter, RTW_ROAM_ON_RESUME)) {
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)
@@ -1333,7 +1333,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter 
*padapter)
rtw_indicate_disconnect(padapter);
}
 
-   DBG_871X("<== "FUNC_ADPT_FMT" exit\n", FUNC_ADPT_ARG(padapter));
+   DBG_871X("<== " FUNC_ADPT_FMT " exit\n", FUNC_ADPT_ARG(padapter));
return _SUCCESS;
 }
 
@@ -1347,7 +1347,7 @@ int rtw_suspend_wow(struct adapter *padapter)
struct wowlan_ioctl_param poidparam;
int ret = _SUCCESS;
 
-   DBG_871X("==> "FUNC_ADPT_FMT" entry\n", FUNC_ADPT_ARG(padapter));
+   DBG_871X("==> " FUNC_ADPT_FMT " entry\n", FUNC_ADPT_ARG(padapter));
 
 
DBG_871X("wowlan_mode: %d\n", pwrpriv->wowlan_mode);
@@ -1401,7 +1401,7 @@ int rtw_suspend_wow(struct adapter *padapter)
}
 
if (rtw_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) 
{
-   DBG_871X(FUNC_ADPT_FMT" back to linked/linking union - 
ch:%u, bw:%u, offset:%u\n",
+   DBG_871X(FUNC_ADPT_FMT " back to linked/linking union - 
ch:%u, bw:%u, offset:%u\n",
FUNC_ADPT_ARG(padapter), ch, bw, offset);
set_channel_bwmode(padapter, ch, offset, bw);
}
@@ -1416,7 +1416,7 @@ int rtw_suspend_wow(struct adapter *padapter)
{
DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR ### wowlan_mode 
=%d\n", __func__, pwrpriv->wowlan_mode);
}
-   DBG_871X("<== "FUNC_ADPT_FMT" exit\n", FUNC_ADPT_ARG(padapter));
+   DBG_871X("<== " FUNC_ADPT_FMT " exit\n", FUNC_ADPT_ARG(padapter));
return ret;
 }
 #endif /* ifdef CONFIG_WOWLAN */
@@ -1430,7 +1430,7 @@ int rtw_suspend_ap_wow(struct adapter *padapter)
struct wowlan_ioctl_param poidparam;

[PATCH 04/10] staging: rtl8723bs: Remove unnecessary spaces at the start of line

2017-09-10 Thread Harsha Sharma
No spaces at the start of a line

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 5ceccd7..97ff3ab 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -597,7 +597,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
_status = _FAIL;
 
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, 
"RTW_CMD_THREAD");
-if (IS_ERR(padapter->cmdThread))
+   if (IS_ERR(padapter->cmdThread))
_status = _FAIL;
else
down(&padapter->cmdpriv.terminate_cmdthread_sema); /* wait for 
cmd_thread to run */
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/10] staging: rtl8723bs: Add spaces around '?', '==', '||', '!='

2017-09-10 Thread Harsha Sharma
Use spaces around most binary operators

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 18f0ac2..5ceccd7 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -1140,7 +1140,7 @@ static int pm_netdev_open(struct net_device *pnetdev, u8 
bnormal)
}
}
else
-   status =  (_SUCCESS == ips_netdrv_open(padapter))?(0):(-1);
+   status =  (_SUCCESS == ips_netdrv_open(padapter)) ? (0) : (-1);
 
return status;
 }
@@ -1262,7 +1262,7 @@ void rtw_dev_unload(struct adapter *padapter)
rtw_btcoex_IpsNotify(padapter, pwrctl->ips_mode_req);
 #ifdef CONFIG_WOWLAN
if (pwrctl->bSupportRemoteWakeup == true &&
-   pwrctl->wowlan_mode ==true) {
+   pwrctl->wowlan_mode == true) {
DBG_871X_LEVEL(_drv_always_, "%s 
bSupportRemoteWakeup ==true  do not run rtw_hal_deinit()\n", __func__);
}
else
@@ -1524,7 +1524,7 @@ int rtw_suspend_common(struct adapter *padapter)
while (pwrpriv->bips_processing == true)
msleep(1);
 
-   if ((!padapter->bup) || 
(padapter->bDriverStopped)||(padapter->bSurpriseRemoved))
+   if ((!padapter->bup) || (padapter->bDriverStopped) || 
(padapter->bSurpriseRemoved))
{
DBG_871X("%s bup =%d bDriverStopped =%d bSurpriseRemoved = 
%d\n", __func__
, padapter->bup, padapter->bDriverStopped, 
padapter->bSurpriseRemoved);
@@ -1671,7 +1671,7 @@ int rtw_resume_process_wow(struct adapter *padapter)
DBG_871X_LEVEL(_drv_always_, "%s: ### ERROR ### wowlan_mode 
=%d\n", __func__, pwrpriv->wowlan_mode);
}
 
-   if (padapter->pid[1]!= 0) {
+   if (padapter->pid[1] != 0) {
DBG_871X("pid[1]:%d\n", padapter->pid[1]);
rtw_signal_process(padapter->pid[1], SIGUSR2);
}
@@ -1774,7 +1774,7 @@ int rtw_resume_process_ap_wow(struct adapter *padapter)
rtw_netif_wake_queue(pnetdev);
}
 
-   if (padapter->pid[1]!= 0) {
+   if (padapter->pid[1] != 0) {
DBG_871X("pid[1]:%d\n", padapter->pid[1]);
rtw_signal_process(padapter->pid[1], SIGUSR2);
}
@@ -1842,7 +1842,7 @@ static int rtw_resume_process_normal(struct adapter 
*padapter)
netif_device_attach(pnetdev);
netif_carrier_on(pnetdev);
 
-   if (padapter->pid[1]!= 0) {
+   if (padapter->pid[1] != 0) {
DBG_871X("pid[1]:%d\n", padapter->pid[1]);
rtw_signal_process(padapter->pid[1], SIGUSR2);
}
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/10] staging: rtl8723bs: Add spaces around '+', '|', '*'

2017-09-10 Thread Harsha Sharma
Use one space around most binary operators

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 7f22ca9..18f0ac2 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -222,7 +222,7 @@
 /*  BIT4 - RF, 0: non-support, 1: support */
 /*  BIT5 - RF_TXPWR_TRACK, 0: non-support, 1: support */
 /*  BIT6 - RF_TXPWR_LMT,   0: non-support, 1: support */
-static int rtw_load_phy_file = (BIT2|BIT6);
+static int rtw_load_phy_file = (BIT2 | BIT6);
 module_param(rtw_load_phy_file, int, 0644);
 MODULE_PARM_DESC(rtw_load_phy_file,"PHY File Bit Map");
 static int rtw_decrypt_phy_file = 0;
@@ -440,12 +440,12 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
u32 priority;
u8 *pdata = skb->data;
 
-   memcpy(ð_type, pdata+(ETH_ALEN<<1), 2);
+   memcpy(ð_type, pdata + (ETH_ALEN << 1), 2);
 
switch (be16_to_cpu(eth_type)) {
case ETH_P_IP:
 
-   piphdr = (struct iphdr *)(pdata+ETH_HLEN);
+   piphdr = (struct iphdr *)(pdata + ETH_HLEN);
 
dscp = piphdr->tos & 0xfc;
 
@@ -561,7 +561,7 @@ struct net_device *rtw_init_netdev(struct adapter 
*old_padapter)
pnetdev->netdev_ops = &rtw_netdev_ops;
 
/* pnetdev->tx_timeout = NULL; */
-   pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */
+   pnetdev->watchdog_timeo = HZ * 3; /* 3 second timeout */
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
 
/* step 2. */
@@ -748,7 +748,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
 
-   _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY |_FW_UNDER_LINKING);
+   _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
 
pwrctrlpriv->pwr_state_check_cnts = 0;
 
@@ -935,7 +935,7 @@ static int _rtw_drv_register_netdev(struct adapter 
*padapter, char *name)
goto error_register_netdev;
}
 
-   DBG_871X("%s, MAC Address (if%d) = " MAC_FMT "\n", __func__, 
(padapter->iface_id+1), MAC_ARG(pnetdev->dev_addr));
+   DBG_871X("%s, MAC Address (if%d) = " MAC_FMT "\n", __func__, 
(padapter->iface_id + 1), MAC_ARG(pnetdev->dev_addr));
 
return ret;
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/10] staging: rtl8723bs: Add spaces around '='

2017-09-10 Thread Harsha Sharma
Use one space around (on each side of) '=' operator

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 0215899..7f22ca9 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -121,7 +121,7 @@
 
 static int rtw_enusbss = 0;/* 0:disable, 1:enable */
 
-static int rtw_hwpdn_mode =2;/* 0:disable, 1:enable, 2: by EFUSE config */
+static int rtw_hwpdn_mode = 2;/* 0:disable, 1:enable, 2: by EFUSE config */
 
 #ifdef CONFIG_HW_PWRP_DETECTION
 static int rtw_hwpwrp_detect = 1;
@@ -183,7 +183,7 @@
 
 module_param(rtw_hw_wps_pbc, int, 0644);
 
-static uint rtw_max_roaming_times =2;
+static uint rtw_max_roaming_times = 2;
 module_param(rtw_max_roaming_times, uint, 0644);
 MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
 
@@ -255,8 +255,8 @@ static uint loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
 
registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
registry_par->vcs_type = (u8)rtw_vcs_type;
-   registry_par->rts_thresh =(u16)rtw_rts_thresh;
-   registry_par->frag_thresh =(u16)rtw_frag_thresh;
+   registry_par->rts_thresh = (u16)rtw_rts_thresh;
+   registry_par->frag_thresh = (u16)rtw_frag_thresh;
registry_par->preamble = (u8)rtw_preamble;
registry_par->scan_mode = (u8)rtw_scan_mode;
registry_par->adhoc_tx_pwr = (u8)rtw_adhoc_tx_pwr;
@@ -652,8 +652,8 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 #ifdef CONFIG_GTK_OL
psecuritypriv->binstallKCK_KEK = _FAIL;
 #endif /* CONFIG_GTK_OL */
-   psecuritypriv->sw_encrypt =pregistrypriv->software_encrypt;
-   psecuritypriv->sw_decrypt =pregistrypriv->software_decrypt;
+   psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
+   psecuritypriv->sw_decrypt = pregistrypriv->software_decrypt;
 
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; /* open system 
*/
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
@@ -777,7 +777,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
goto exit;
}
 
-   padapter->cmdpriv.padapter =padapter;
+   padapter->cmdpriv.padapter = padapter;
 
if ((rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init 
evt_priv\n"));
@@ -986,7 +986,7 @@ int _netdev_open(struct net_device *pnetdev)
 
DBG_871X("MAC Address = "MAC_FMT"\n", 
MAC_ARG(pnetdev->dev_addr));
 
-   status =rtw_start_drv_threads(padapter);
+   status = rtw_start_drv_threads(padapter);
if (status == _FAIL) {
DBG_871X("Initialize driver software resource 
Failed!\n");
goto netdev_open_error;
@@ -1641,7 +1641,7 @@ int rtw_resume_process_wow(struct adapter *padapter)
}
 
/* Disable WOW, set H2C command */
-   poidparam.subcode =WOWLAN_DISABLE;
+   poidparam.subcode = WOWLAN_DISABLE;
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_WOWLAN, (u8 
*)&poidparam);
 
psta = rtw_get_stainfo(&padapter->stapriv, 
get_bssid(&padapter->mlmepriv));
@@ -1705,7 +1705,7 @@ int rtw_resume_process_wow(struct adapter *padapter)
DBG_871X_LEVEL(_drv_always_, "do not reset timer\n");
}
 
-   pwrpriv->wowlan_mode =false;
+   pwrpriv->wowlan_mode = false;
 
/* clean driver side wake up reason. */
pwrpriv->wowlan_wake_reason = 0;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 00/10] staging: rtl8723bs: Follow linux-kernel coding style

2017-09-10 Thread Harsha Sharma
Linux kernel coding style uses one space around most binary and ternary
operators and spaces are prohibited at the start of a line. Concatenated
strings should have space between elements and space is required after ','.
In conditional statements, do not use unnecessary braces where a single
statement will do and put the opening brace last on the line, and put
the closing brace first. Unnecessary spaces and blank lines should be
avoided. 

Harsha Sharma (10):
  staging: rtl8723bs: Add spaces around '='
  staging: rtl8723bs: Add spaces around '+', '|', '*'
  staging: rtl8723bs: Add spaces around '?', '==', '||', '!='
  staging: rtl8723bs: Remove unnecessary spaces at the start of line
  staging: rtl8723bs: Add space between concatenated strings
  staging: rtl8723bs: Add space after ','
  staging: rtl8723bs: Removed unneccesary space
  staging: rtl8723bs: Remove unnecessary space
  staging: rtl8723bs: Remove unneccesary braces and change position of
open brace
  staging: rtl8723bs: Remove unnecessary blank lines

 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 190 
 1 file changed, 78 insertions(+), 112 deletions(-)

-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Add spaces around '=', '|', '<<'

2017-09-09 Thread Harsha Sharma
Use one space around most binary operators

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 0215899..0129381 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -121,7 +121,7 @@
 
 static int rtw_enusbss = 0;/* 0:disable, 1:enable */
 
-static int rtw_hwpdn_mode =2;/* 0:disable, 1:enable, 2: by EFUSE config */
+static int rtw_hwpdn_mode = 2;/* 0:disable, 1:enable, 2: by EFUSE config */
 
 #ifdef CONFIG_HW_PWRP_DETECTION
 static int rtw_hwpwrp_detect = 1;
@@ -183,7 +183,7 @@
 
 module_param(rtw_hw_wps_pbc, int, 0644);
 
-static uint rtw_max_roaming_times =2;
+static uint rtw_max_roaming_times = 2;
 module_param(rtw_max_roaming_times, uint, 0644);
 MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
 
@@ -222,7 +222,7 @@
 /*  BIT4 - RF, 0: non-support, 1: support */
 /*  BIT5 - RF_TXPWR_TRACK, 0: non-support, 1: support */
 /*  BIT6 - RF_TXPWR_LMT,   0: non-support, 1: support */
-static int rtw_load_phy_file = (BIT2|BIT6);
+static int rtw_load_phy_file = (BIT2 | BIT6);
 module_param(rtw_load_phy_file, int, 0644);
 MODULE_PARM_DESC(rtw_load_phy_file,"PHY File Bit Map");
 static int rtw_decrypt_phy_file = 0;
@@ -255,8 +255,8 @@ static uint loadparam(struct adapter *padapter, _nic_hdl 
pnetdev)
 
registry_par->vrtl_carrier_sense = (u8)rtw_vrtl_carrier_sense ;
registry_par->vcs_type = (u8)rtw_vcs_type;
-   registry_par->rts_thresh =(u16)rtw_rts_thresh;
-   registry_par->frag_thresh =(u16)rtw_frag_thresh;
+   registry_par->rts_thresh = (u16)rtw_rts_thresh;
+   registry_par->frag_thresh = (u16)rtw_frag_thresh;
registry_par->preamble = (u8)rtw_preamble;
registry_par->scan_mode = (u8)rtw_scan_mode;
registry_par->adhoc_tx_pwr = (u8)rtw_adhoc_tx_pwr;
@@ -440,7 +440,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
u32 priority;
u8 *pdata = skb->data;
 
-   memcpy(ð_type, pdata+(ETH_ALEN<<1), 2);
+   memcpy(ð_type, pdata+(ETH_ALEN << 1), 2);
 
switch (be16_to_cpu(eth_type)) {
case ETH_P_IP:
@@ -652,8 +652,8 @@ static u8 rtw_init_default_value(struct adapter *padapter)
 #ifdef CONFIG_GTK_OL
psecuritypriv->binstallKCK_KEK = _FAIL;
 #endif /* CONFIG_GTK_OL */
-   psecuritypriv->sw_encrypt =pregistrypriv->software_encrypt;
-   psecuritypriv->sw_decrypt =pregistrypriv->software_decrypt;
+   psecuritypriv->sw_encrypt = pregistrypriv->software_encrypt;
+   psecuritypriv->sw_decrypt = pregistrypriv->software_decrypt;
 
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; /* open system 
*/
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
@@ -748,7 +748,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
pmlmepriv->LinkDetectInfo.TrafficTransitionCount = 0;
pmlmepriv->LinkDetectInfo.LowPowerTransitionCount = 0;
 
-   _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY |_FW_UNDER_LINKING);
+   _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
 
pwrctrlpriv->pwr_state_check_cnts = 0;
 
@@ -777,7 +777,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
goto exit;
}
 
-   padapter->cmdpriv.padapter =padapter;
+   padapter->cmdpriv.padapter = padapter;
 
if ((rtw_init_evt_priv(&padapter->evtpriv)) == _FAIL) {
RT_TRACE(_module_os_intfs_c_, _drv_err_, ("\n Can't init 
evt_priv\n"));
@@ -986,7 +986,7 @@ int _netdev_open(struct net_device *pnetdev)
 
DBG_871X("MAC Address = "MAC_FMT"\n", 
MAC_ARG(pnetdev->dev_addr));
 
-   status =rtw_start_drv_threads(padapter);
+   status = rtw_start_drv_threads(padapter);
if (status == _FAIL) {
DBG_871X("Initialize driver software resource 
Failed!\n");
goto netdev_open_error;
@@ -1641,7 +1641,7 @@ int rtw_resume_process_wow(struct adapter *padapter)
}
 
/* Disable WOW, set H2C command */
-   poidparam.subcode =WOWLAN_DISABLE;
+   poidparam.subcode = WOWLAN_DISABLE;
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_WOWLAN, (u8 
*)&poidparam);
 
psta = rtw_get_stainfo(&padapter->stapriv, 
get_bssid(&padapter->mlmepriv));
@@ -1705,7 +1705,7 @@ int rtw_resume_process_wow(struct adapter *padapter)
DBG_871X_LEVEL(_drv_always_, "do not reset timer\n");
}
 
-   pwrpriv->wowlan_mode =false;
+   pw

[PATCH v2] staging: rtl8723bs: Change coding style to (foo *bar)

2017-09-09 Thread Harsha Sharma
This coding style (foo *bar) is more common for the kernel code.
Change foo* bar to foo *bar.
Change foo * bar to foo *bar.
Change (foo*) to (foo *).

Signed-off-by: Harsha Sharma 
---
Change in v2:
 -Updated log message and subject
 
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 0215899..a82804b 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -142,11 +142,11 @@
 #endif
 module_param(rtw_qos_opt_enable, int, 0644);
 
-static char* ifname = "wlan%d";
+static char *ifname = "wlan%d";
 module_param(ifname, charp, 0644);
 MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
 
-char* rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
+char *rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
 
 module_param(rtw_initmac, charp, 0644);
 module_param(rtw_channel_plan, int, 0644);
@@ -460,7 +460,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
 
 }
 
-static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long 
state, void *ptr)
+static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long 
state, void *ptr)
 {
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 
@@ -623,7 +623,7 @@ void rtw_stop_drv_threads (struct adapter *padapter)
 static u8 rtw_init_default_value(struct adapter *padapter)
 {
u8 ret  = _SUCCESS;
-   struct registry_priv* pregistrypriv = &padapter->registrypriv;
+   struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
@@ -691,7 +691,7 @@ struct dvobj_priv *devobj_init(void)
 {
struct dvobj_priv *pdvobj = NULL;
 
-   if ((pdvobj = (struct dvobj_priv*)rtw_zmalloc(sizeof(*pdvobj))) == NULL)
+   if ((pdvobj = (struct dvobj_priv *)rtw_zmalloc(sizeof(*pdvobj))) == 
NULL)
return NULL;
 
mutex_init(&pdvobj->hw_init_mutex);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Change foo* bar to foo *bar

2017-09-09 Thread Harsha Sharma
This coding style (foo *bar) is more common for the kernel code.

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 0215899..a82804b 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -142,11 +142,11 @@
 #endif
 module_param(rtw_qos_opt_enable, int, 0644);
 
-static char* ifname = "wlan%d";
+static char *ifname = "wlan%d";
 module_param(ifname, charp, 0644);
 MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
 
-char* rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
+char *rtw_initmac = NULL;  /*  temp mac address if users want to use instead 
of the mac address in Efuse */
 
 module_param(rtw_initmac, charp, 0644);
 module_param(rtw_channel_plan, int, 0644);
@@ -460,7 +460,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
 
 }
 
-static int rtw_ndev_notifier_call(struct notifier_block * nb, unsigned long 
state, void *ptr)
+static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long 
state, void *ptr)
 {
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 
@@ -623,7 +623,7 @@ void rtw_stop_drv_threads (struct adapter *padapter)
 static u8 rtw_init_default_value(struct adapter *padapter)
 {
u8 ret  = _SUCCESS;
-   struct registry_priv* pregistrypriv = &padapter->registrypriv;
+   struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
@@ -691,7 +691,7 @@ struct dvobj_priv *devobj_init(void)
 {
struct dvobj_priv *pdvobj = NULL;
 
-   if ((pdvobj = (struct dvobj_priv*)rtw_zmalloc(sizeof(*pdvobj))) == NULL)
+   if ((pdvobj = (struct dvobj_priv *)rtw_zmalloc(sizeof(*pdvobj))) == 
NULL)
return NULL;
 
mutex_init(&pdvobj->hw_init_mutex);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: Do not initialise statics to 0

2017-09-09 Thread Harsha Sharma
Static variables are initialised to 0 by gcc

Signed-off-by: Harsha Sharma 
---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 48 ++---
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c 
b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index 0215899..1686af0 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -24,9 +24,9 @@
 MODULE_VERSION(DRIVERVERSION);
 
 /* module param defaults */
-static int rtw_chip_version = 0x00;
+static int rtw_chip_version;
 static int rtw_rfintfs = HWPI;
-static int rtw_lbkmode = 0;/* RTL8712_AIR_TRX; */
+static int rtw_lbkmode;/* RTL8712_AIR_TRX; */
 
 
 static int rtw_network_mode = Ndis802_11IBSS;/* 
Ndis802_11Infrastructure;infra, ad-hoc, auto */
@@ -40,7 +40,7 @@
 static int rtw_preamble = PREAMBLE_LONG;/* long, short, auto */
 static int rtw_scan_mode = 1;/* active, passive */
 static int rtw_adhoc_tx_pwr = 1;
-static int rtw_soft_ap = 0;
+static int rtw_soft_ap;
 /* int smart_ps = 1; */
 static int rtw_power_mgnt = 1;
 static int rtw_ips_mode = IPS_NORMAL;
@@ -61,18 +61,18 @@
 /* int qos_enable = 0; */
 static int rtw_ack_policy = NORMAL_ACK;
 
-static int rtw_software_encrypt = 0;
-static int rtw_software_decrypt = 0;
+static int rtw_software_encrypt;
+static int rtw_software_decrypt;
 
-static int rtw_acm_method = 0;/*  0:By SW 1:By HW. */
+static int rtw_acm_method;/*  0:By SW 1:By HW. */
 
 static int rtw_wmm_enable = 1;/*  default is set to enable the wmm. */
-static int rtw_uapsd_enable = 0;
+static int rtw_uapsd_enable;
 static int rtw_uapsd_max_sp = NO_LIMIT;
-static int rtw_uapsd_acbk_en = 0;
-static int rtw_uapsd_acbe_en = 0;
-static int rtw_uapsd_acvi_en = 0;
-static int rtw_uapsd_acvo_en = 0;
+static int rtw_uapsd_acbk_en;
+static int rtw_uapsd_acbe_en;
+static int rtw_uapsd_acvi_en;
+static int rtw_uapsd_acvo_en;
 
 int rtw_ht_enable = 1;
 /*  0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160MHz, 4: 80+80MHz */
@@ -81,7 +81,7 @@
 static int rtw_bw_mode = 0x21;
 static int rtw_ampdu_enable = 1;/* for enable tx_ampdu ,0: disable, 0x1:enable 
(but wifi_spec should be 0), 0x2: force enable (don't care wifi_spec) */
 static int rtw_rx_stbc = 1;/*  0: disable, 1:enable 2.4g */
-static int rtw_ampdu_amsdu = 0;/*  0: disabled, 1:enabled, 2:auto . There is 
an IOT issu with DLINK DIR-629 when the flag turn on */
+static int rtw_ampdu_amsdu;/*  0: disabled, 1:enabled, 2:auto . There is an 
IOT issu with DLINK DIR-629 when the flag turn on */
 /*  Short GI support Bit Map */
 /*  BIT0 - 20MHz, 0: non-support, 1: support */
 /*  BIT1 - 40MHz, 0: non-support, 1: support */
@@ -99,8 +99,8 @@
 
 /* int rf_config = RF_1T2R;  1T2R */
 static int rtw_rf_config = RF_MAX_TYPE;  /* auto */
-static int rtw_low_power = 0;
-static int rtw_wifi_spec = 0;
+static int rtw_low_power;
+static int rtw_wifi_spec;
 static int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
 
 static int rtw_btcoex_enable = 1;
@@ -116,29 +116,29 @@
 static int rtw_AcceptAddbaReq = true;/*  0:Reject AP's Add BA req, 1:Accept 
AP's Add BA req. */
 
 static int rtw_antdiv_cfg = 1; /*  0:OFF , 1:ON, 2:decide by Efuse config */
-static int rtw_antdiv_type = 0 ; /* 0:decide by efuse  1: for 88EE, 1Tx and 
1RxCG are diversity.(2 Ant with SPDT), 2:  for 88EE, 1Tx and 2Rx are 
diversity.(2 Ant, Tx and RxCG are both on aux port, RxCS is on main port), 3: 
for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */
+static int rtw_antdiv_type; /* 0:decide by efuse  1: for 88EE, 1Tx and 1RxCG 
are diversity.(2 Ant with SPDT), 2:  for 88EE, 1Tx and 2Rx are diversity.(2 
Ant, Tx and RxCG are both on aux port, RxCS is on main port), 3: for 88EE, 1Tx 
and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port) */
 
 
-static int rtw_enusbss = 0;/* 0:disable, 1:enable */
+static int rtw_enusbss;/* 0:disable, 1:enable */
 
 static int rtw_hwpdn_mode =2;/* 0:disable, 1:enable, 2: by EFUSE config */
 
 #ifdef CONFIG_HW_PWRP_DETECTION
 static int rtw_hwpwrp_detect = 1;
 #else
-static int rtw_hwpwrp_detect = 0; /* HW power  ping detect 0:disable , 
1:enable */
+static int rtw_hwpwrp_detect; /* HW power  ping detect 0:disable , 1:enable */
 #endif
 
-static int rtw_hw_wps_pbc = 0;
+static int rtw_hw_wps_pbc;
 
 int rtw_mc2u_disable = 0;
 
-static int rtw_80211d = 0;
+static int rtw_80211d;
 
 #ifdef CONFIG_QOS_OPTIMIZATION
 static int rtw_qos_opt_enable = 1;/* 0: disable, 1:enable */
 #else
-static int rtw_qos_opt_enable = 0;/* 0: disable, 1:enable */
+static int rtw_qos_opt_enable;/* 0: disable, 1:enable */
 #endif
 module_param(rtw_qos_opt_enable, int, 0644);
 
@@ -192,7 +192,7 @@
 module_param(rtw_80211d, int, 0644);
 MODULE_PARM_DESC(rtw_80211d, "Enable 802.11d mechanism");
 
-static uint rtw_notch_filter = 0;
+static uint rtw_notch_filter;
 module_param(rtw_notch_filter, uint, 0644);
 MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only 

[PATCH] staging: sm750fb: Remove extra blank lines

2017-09-09 Thread Harsha Sharma
This was reported by checkpatch.pl

Signed-off-by: Harsha Sharma 
---
 drivers/staging/sm750fb/sm750_cursor.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_cursor.c 
b/drivers/staging/sm750fb/sm750_cursor.c
index aa47a16..6b27b06 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -18,8 +18,6 @@
 #include "sm750.h"
 #include "sm750_cursor.h"
 
-
-
 #define poke32(addr, data) \
 writel((data), cursor->mmio + (addr))
 
@@ -45,7 +43,6 @@
 #define HWC_COLOR_3 0xC
 #define HWC_COLOR_3_RGB565_MASK 0x
 
-
 /* hw_cursor_xxx works for voyager,718 and 750 */
 void sm750_hw_cursor_enable(struct lynx_cursor *cursor)
 {
@@ -134,7 +131,6 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, 
u16 rop,
}
 }
 
-
 void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop,
  const u8 *pcol, const u8 *pmsk)
 {
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: unisys: visorbus: Declared char * array as static const

2017-09-09 Thread Harsha Sharma
State explicitly that individual entries in array will not change.

Signed-off-by: Harsha Sharma 
---
 drivers/staging/unisys/visorbus/visorchipset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c 
b/drivers/staging/unisys/visorbus/visorchipset.c
index 6d4498f..6f2a010 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1162,7 +1162,7 @@ static ssize_t deviceenabled_store(struct device *dev,
struct controlvm_message_packet *cmd = &req->msg.cmd;
char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
env_func[40];
-   char *envp[] = {
+   static const char * const envp[] = {
env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL
};
 
@@ -1263,7 +1263,7 @@ static ssize_t deviceenabled_store(struct device *dev,
 chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
 {
char env_selftest[20];
-   char *envp[] = { env_selftest, NULL };
+   static const char * const envp[] = { env_selftest, NULL };
int res;
 
sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] staging: typec: tcpm: Rewrite comparison to NULL pointer

2017-09-08 Thread Harsha Sharma
Make code more concise and readable 

Signed-off-by: Harsha Sharma 
---
Change in v3:
 -Change in subject and log message
Change in v2:
 -Change in subject 
 -Change in log message
 drivers/staging/typec/tcpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 630fe75..9f4a5a5 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -982,7 +982,7 @@ static void svdm_consume_modes(struct tcpm_port *port, 
const __le32 *payload,
}
port->partner_altmode[pmdata->altmodes] =
typec_partner_register_altmode(port->partner, paltmode);
-   if (port->partner_altmode[pmdata->altmodes] == NULL) {
+   if (!port->partner_altmode[pmdata->altmodes]) {
tcpm_log(port,
 "Failed to register alternate modes for SVID 0x%04x",
 paltmode->svid);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: typec: tcpm: Comparison to NULL pointer

2017-09-08 Thread Harsha Sharma
Makes code more concise and readable 

Signed-off-by: Harsha Sharma 
---
Change in v2:
 -Change in subject 
 -Change in log message
 drivers/staging/typec/tcpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 630fe75..9f4a5a5 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -982,7 +982,7 @@ static void svdm_consume_modes(struct tcpm_port *port, 
const __le32 *payload,
}
port->partner_altmode[pmdata->altmodes] =
typec_partner_register_altmode(port->partner, paltmode);
-   if (port->partner_altmode[pmdata->altmodes] == NULL) {
+   if (!port->partner_altmode[pmdata->altmodes]) {
tcpm_log(port,
 "Failed to register alternate modes for SVID 0x%04x",
 paltmode->svid);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: typec: tcpm: Comparison to NULL changed as "!port->partner_altmode[pmdata->altmodes]"

2017-09-08 Thread Harsha Sharma
Fixes coding style issue

Signed-off-by: Harsha Sharma 
---
 drivers/staging/typec/tcpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index 630fe75..9f4a5a5 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -982,7 +982,7 @@ static void svdm_consume_modes(struct tcpm_port *port, 
const __le32 *payload,
}
port->partner_altmode[pmdata->altmodes] =
typec_partner_register_altmode(port->partner, paltmode);
-   if (port->partner_altmode[pmdata->altmodes] == NULL) {
+   if (!port->partner_altmode[pmdata->altmodes]) {
tcpm_log(port,
 "Failed to register alternate modes for SVID 0x%04x",
 paltmode->svid);
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v6] staging: pi433: Fixes minor typo errors

2017-09-08 Thread Harsha Sharma
Fixes checkpatch warning -- "occured" and "succesfully" are misspelled

Signed-off-by: Harsha Sharma 
---
Changes in v6:
 -Added changes from other versions
Changes in v5:
 -Signed-off properly with correct author name in .gitconfig
Changes in v4:
 -Correct the format of the subject.
 -Signed-off with same author name and signed-off name
Changes in v3:
 -Added space after : and removed file extension from subject
 drivers/staging/pi433/pi433_if.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 6b9b7df..6a10478 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -473,7 +473,7 @@ struct pi433_instance {
}
 
 
-   /* rx done, wait was interrupted or error occured */
+   /* rx done, wait was interrupted or error occurred */
 abort:
dev->interrupt_rx_allowed = true;
SET_CHECKED(rf69_set_mode(dev->spi, standby));
@@ -1033,7 +1033,7 @@ static int setup_GPIOs(struct pi433_device *device)
if (retval)
return retval;
 
-   dev_dbg(&device->spi->dev, "%s succesfully configured", name);
+   dev_dbg(&device->spi->dev, "%s successfully configured", name);
}
 
return 0;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v5] staging: pi433: Fixes minor typo errors

2017-09-08 Thread Harsha Sharma
Fixes checkpatch warning -- "occured" and "succesfully" are misspelled

Signed-off-by: Harsha Sharma 
---
Changes in v5:
 -Correct the format of the subject.
 -Signed-off properly with correct author name in .gitconfig
 drivers/staging/pi433/pi433_if.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 6b9b7df..6a10478 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -473,7 +473,7 @@ struct pi433_instance {
}
 
 
-   /* rx done, wait was interrupted or error occured */
+   /* rx done, wait was interrupted or error occurred */
 abort:
dev->interrupt_rx_allowed = true;
SET_CHECKED(rf69_set_mode(dev->spi, standby));
@@ -1033,7 +1033,7 @@ static int setup_GPIOs(struct pi433_device *device)
if (retval)
return retval;
 
-   dev_dbg(&device->spi->dev, "%s succesfully configured", name);
+   dev_dbg(&device->spi->dev, "%s successfully configured", name);
}
 
return 0;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel