[PATCH V2 37/40] staging: wilc1000: move variable FALSE_FRMWR_CHANNEL

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch move variable 'FALSE_FRMWR_CHANNEL' to local define position.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5006f5d..02c9763 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -60,6 +60,7 @@ extern u8 g_wilc_initialized;
 #define BA_SESSION_DEFAULT_BUFFER_SIZE  16
 #define BA_SESSION_DEFAULT_TIMEOUT  1000
 #define BLOCK_ACK_REQ_SIZE  0x14
+#define FALSE_FRMWR_CHANNEL100
 
 struct cfg_param_attr {
struct cfg_param_val cfg_attr_info;
@@ -2655,7 +2656,6 @@ static int Handle_RegisterFrame(struct host_if_drv 
*hif_drv,
return result;
 }
 
-#define FALSE_FRMWR_CHANNEL 100
 static u32 Handle_ListenStateExpired(struct host_if_drv *hif_drv,
 struct remain_ch *pstrHostIfRemainOnChan)
 {
-- 
1.9.1

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


[PATCH V2 39/40] staging: wilc1000: fixes alignment should match open parenthesis

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch fixes the checks reported by checkpatch.pl
for alignment should match open parenthesis.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 155 +++---
 1 file changed, 79 insertions(+), 76 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 08f70d8..3209444 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -343,7 +343,7 @@ static s32 Handle_SetChannel(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Setting channel\n");
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if (result) {
PRINT_ER("Failed to set channel\n");
@@ -365,7 +365,7 @@ static s32 Handle_SetWfiDrvHandler(struct host_if_drv 
*hif_drv,
strWID.size = sizeof(u32);
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  pstrHostIfSetDrvHandler->u32Address);
+pstrHostIfSetDrvHandler->u32Address);
 
if (!hif_drv)
up(&hif_sema_driver);
@@ -390,7 +390,7 @@ static s32 Handle_SetOperationMode(struct host_if_drv 
*hif_drv,
strWID.size = sizeof(u32);
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if ((pstrHostIfSetOperationMode->u32Mode) == IDLE_MODE)
up(&hif_sema_driver);
@@ -422,7 +422,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
strWID.size = IP_ALEN;
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
host_int_get_ipaddress(hif_drv, firmwareIPAddress, idx);
 
@@ -447,7 +447,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
strWID.size = IP_ALEN;
 
result = send_config_pkt(GET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.val);
 
@@ -490,7 +490,7 @@ static s32 Handle_SetMacAddress(struct host_if_drv *hif_drv,
PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", strWID.val);
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
if (result) {
PRINT_ER("Failed to set mac address\n");
result = -EFAULT;
@@ -512,7 +512,7 @@ static s32 Handle_GetMacAddress(struct host_if_drv *hif_drv,
strWID.size = ETH_ALEN;
 
result = send_config_pkt(GET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if (result) {
PRINT_ER("Failed to get mac address\n");
@@ -797,7 +797,7 @@ static s32 Handle_CfgParam(struct host_if_drv *hif_drv,
}
 
result = send_config_pkt(SET_CFG, strWIDList, u8WidCnt,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if (result)
PRINT_ER("Error in setting CFG params\n");
@@ -918,7 +918,7 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
scan_while_connected = false;
 
result = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if (result)
PRINT_ER("Failed to send scan paramters config packet\n");
@@ -970,7 +970,7 @@ static s32 Handle_ScanDone(struct host_if_drv *hif_drv,
strWID.size = sizeof(char);
 
result = send_config_pkt(SET_CFG, &strWID, 1,
-  get_id_from_handler(hif_drv));
+get_id_from_handler(hif_drv));
 
if (result) {
PRINT_ER("Failed to set abort running scan\n");
@@ -1027,16 +1027,18 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
hif_drv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssid_len;
if (pstrHostIFconnectAttr->ssid != NULL) {
hif_drv->strWILC_UsrConnReq.pu8ssid = 
kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL);
-   memcpy(hif_drv->strWILC_UsrConnReq.pu8ssid, 
pstrHostIFconnectAttr->ssid,
-   pstrHostIFconnectAttr->ssid_len);
+   memcp

[PATCH V2 35/40] staging: wilc1000: rename variable s32Error

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable s32Error to result
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 784 ++
 1 file changed, 371 insertions(+), 413 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0b3c991..e6c4da3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -330,8 +330,7 @@ static struct host_if_drv *get_handler_from_id(int id)
 static s32 Handle_SetChannel(struct host_if_drv *hif_drv,
 struct channel_attr *pstrHostIFSetChan)
 {
-
-   s32 s32Error = 0;
+   s32 result = 0;
struct wid strWID;
 
strWID.id = (u16)WID_CURRENT_CHANNEL;
@@ -341,21 +340,21 @@ static s32 Handle_SetChannel(struct host_if_drv *hif_drv,
 
PRINT_D(HOSTINF_DBG, "Setting channel\n");
 
-   s32Error = send_config_pkt(SET_CFG, &strWID, 1,
+   result = send_config_pkt(SET_CFG, &strWID, 1,
   get_id_from_handler(hif_drv));
-   if (s32Error) {
+
+   if (result) {
PRINT_ER("Failed to set channel\n");
return -EINVAL;
}
 
-   return s32Error;
+   return result;
 }
 
 static s32 Handle_SetWfiDrvHandler(struct host_if_drv *hif_drv,
   struct drv_handler *pstrHostIfSetDrvHandler)
 {
-
-   s32 s32Error = 0;
+   s32 result = 0;
struct wid strWID;
 
strWID.id = (u16)WID_SET_DRV_HANDLER;
@@ -363,25 +362,24 @@ static s32 Handle_SetWfiDrvHandler(struct host_if_drv 
*hif_drv,
strWID.val = (s8 *)&(pstrHostIfSetDrvHandler->u32Address);
strWID.size = sizeof(u32);
 
-   s32Error = send_config_pkt(SET_CFG, &strWID, 1,
+   result = send_config_pkt(SET_CFG, &strWID, 1,
   pstrHostIfSetDrvHandler->u32Address);
 
if (!hif_drv)
up(&hif_sema_driver);
 
-   if (s32Error) {
+   if (result) {
PRINT_ER("Failed to set driver handler\n");
return -EINVAL;
}
 
-   return s32Error;
+   return result;
 }
 
 static s32 Handle_SetOperationMode(struct host_if_drv *hif_drv,
   struct op_mode *pstrHostIfSetOperationMode)
 {
-
-   s32 s32Error = 0;
+   s32 result = 0;
struct wid strWID;
 
strWID.id = (u16)WID_SET_OPERATION_MODE;
@@ -389,25 +387,23 @@ static s32 Handle_SetOperationMode(struct host_if_drv 
*hif_drv,
strWID.val = (s8 *)&(pstrHostIfSetOperationMode->u32Mode);
strWID.size = sizeof(u32);
 
-   s32Error = send_config_pkt(SET_CFG, &strWID, 1,
+   result = send_config_pkt(SET_CFG, &strWID, 1,
   get_id_from_handler(hif_drv));
 
-
if ((pstrHostIfSetOperationMode->u32Mode) == IDLE_MODE)
up(&hif_sema_driver);
 
-   if (s32Error) {
+   if (result) {
PRINT_ER("Failed to set driver handler\n");
return -EINVAL;
}
 
-   return s32Error;
+   return result;
 }
 
 s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
 {
-
-   s32 s32Error = 0;
+   s32 result = 0;
struct wid strWID;
char firmwareIPAddress[4] = {0};
 
@@ -423,26 +419,24 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
strWID.val = (u8 *)pu8IPAddr;
strWID.size = IP_ALEN;
 
-   s32Error = send_config_pkt(SET_CFG, &strWID, 1,
+   result = send_config_pkt(SET_CFG, &strWID, 1,
   get_id_from_handler(hif_drv));
 
-
host_int_get_ipaddress(hif_drv, firmwareIPAddress, idx);
 
-   if (s32Error) {
+   if (result) {
PRINT_ER("Failed to set IP address\n");
return -EINVAL;
}
 
PRINT_INFO(HOSTINF_DBG, "IP address set\n");
 
-   return s32Error;
+   return result;
 }
 
 s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 *pu8IPAddr, u8 idx)
 {
-
-   s32 s32Error = 0;
+   s32 result = 0;
struct wid strWID;
 
strWID.id = (u16)WID_IP_ADDRESS;
@@ -450,7 +444,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
strWID.val = kmalloc(IP_ALEN, GFP_KERNEL);
strWID.size = IP_ALEN;
 
-   s32Error = send_config_pkt(GET_CFG, &strWID, 1,
+   result = send_config_pkt(GET_CFG, &strWID, 1,
   get_id_from_handler(hif_drv));
 
PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.val);
@@ -462,7 +456,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0)
host_int_setup_ipaddress(hif_drv, set_ip[idx], idx);
 
-   if (s32Error != 0) {
+   if (result !

[PATCH V2 38/40] staging: wilc1000: fixes unnecessary variable replacement

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch removes an unnecessary variable use for the errors and
returns errors directly without a result variable.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 28 +---
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 02c9763..08f70d8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3200,9 +3200,8 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv 
*hif_drv,
struct host_if_msg msg;
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("driver is null\n");
-   return result;
+   return -EFAULT;
}
 
memset(&msg, 0, sizeof(struct host_if_msg));
@@ -3237,9 +3236,8 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
u8 i;
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("driver is null\n");
-   return result;
+   return -EFAULT;
}
 
memset(&msg, 0, sizeof(struct host_if_msg));
@@ -3279,9 +3277,8 @@ s32 host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *pu8Ptk,
u32 i;
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("driver is null\n");
-   return result;
+   return -EFAULT;
}
if (pu8RxMic != NULL)
u8KeyLen += RX_MIC_KEY_LEN;
@@ -3344,9 +3341,8 @@ s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *pu8RxGtk,
u8 u8KeyLen = u8GtkKeylen;
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("driver is null\n");
-   return result;
+   return -EFAULT;
}
memset(&msg, 0, sizeof(struct host_if_msg));
 
@@ -3403,9 +3399,8 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hif_drv, 
struct host_if_pmkid_at
 
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("driver is null\n");
-   return result;
+   return -EFAULT;
}
 
memset(&msg, 0, sizeof(struct host_if_msg));
@@ -3548,9 +3543,8 @@ s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 
*pu8bssid,
enum scan_conn_timer enuScanConnTimer;
 
if (!hif_drv || pfConnectResult == NULL) {
-   result = -EFAULT;
PRINT_ER("Driver is null\n");
-   return result;
+   return -EFAULT;
}
 
if (pJoinParams == NULL) {
@@ -3610,16 +3604,12 @@ s32 host_int_flush_join_req(struct host_if_drv *hif_drv)
s32 result = 0;
struct host_if_msg msg;
 
-   if (!join_req) {
-   result = -EFAULT;
-   return result;
-   }
-
+   if (!join_req)
+   return -EFAULT;
 
if (!hif_drv) {
-   result = -EFAULT;
PRINT_ER("Driver is null\n");
-   return result;
+   return -EFAULT;
}
 
msg.id = HOST_IF_MSG_FLUSH_CONNECT;
-- 
1.9.1

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


[PATCH V2 36/40] staging: wilc1000: move variable clients_count

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch move static variable clients_count to local variable position.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e6c4da3..5006f5d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -260,6 +260,7 @@ static u8 set_ip[2][4];
 static u8 get_ip[2][4];
 static u32 inactive_time;
 static u8 del_beacon;
+static u32 clients_count;
 
 static u8 *join_req;
 static u8 *info_element;
@@ -4175,8 +4176,6 @@ void host_int_send_network_info_to_host
 {
 }
 
-static u32 clients_count;
-
 s32 host_int_init(struct host_if_drv **hif_drv_handler)
 {
s32 result = 0;
-- 
1.9.1

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


[PATCH V2 40/40] staging: wilc1000: fixes comparison to NULL could be written

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch fixes the checks reported by checkpatch.pl
for comparison to NULL could be written.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 220 ++
 1 file changed, 106 insertions(+), 114 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3209444..eea3a1a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -476,8 +476,7 @@ static s32 Handle_SetMacAddress(struct host_if_drv *hif_drv,
s32 result = 0;
struct wid strWID;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
-
-   if (mac_buf == NULL) {
+   if (!mac_buf) {
PRINT_ER("No buffer to send mac address\n");
return -EFAULT;
}
@@ -857,7 +856,7 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
valuesize += 
((pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo[i].u8ssidlen) + 1);
pu8HdnNtwrksWidVal = kmalloc(valuesize + 1, GFP_KERNEL);
strWIDList[u32WidsCount].val = pu8HdnNtwrksWidVal;
-   if (strWIDList[u32WidsCount].val != NULL) {
+   if (strWIDList[u32WidsCount].val) {
pu8Buffer = strWIDList[u32WidsCount].val;
 
*pu8Buffer++ = pstrHostIFscanAttr->hidden_network.u8ssidnum;
@@ -893,7 +892,8 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
strWIDList[u32WidsCount].id = WID_SCAN_CHANNEL_LIST;
strWIDList[u32WidsCount].type = WID_BIN_DATA;
 
-   if (pstrHostIFscanAttr->ch_freq_list != NULL && 
pstrHostIFscanAttr->ch_list_len > 0) {
+   if (pstrHostIFscanAttr->ch_freq_list &&
+   pstrHostIFscanAttr->ch_list_len > 0) {
int i;
 
for (i = 0; i < pstrHostIFscanAttr->ch_list_len; i++)   {
@@ -931,21 +931,22 @@ ERRORHANDLER:
Handle_ScanDone(hif_drv, SCAN_EVENT_ABORTED);
}
 
-   if (pstrHostIFscanAttr->ch_freq_list != NULL) {
+   if (pstrHostIFscanAttr->ch_freq_list) {
kfree(pstrHostIFscanAttr->ch_freq_list);
pstrHostIFscanAttr->ch_freq_list = NULL;
}
 
-   if (pstrHostIFscanAttr->ies != NULL) {
+   if (pstrHostIFscanAttr->ies) {
kfree(pstrHostIFscanAttr->ies);
pstrHostIFscanAttr->ies = NULL;
}
-   if (pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo != NULL)   
{
+
+   if (pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo) {
kfree(pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo);
pstrHostIFscanAttr->hidden_network.pstrHiddenNetworkInfo = NULL;
}
 
-   if (pu8HdnNtwrksWidVal != NULL)
+   if (pu8HdnNtwrksWidVal)
kfree(pu8HdnNtwrksWidVal);
 
return result;
@@ -1013,19 +1014,19 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global 
structure\n");
 
ptstrJoinBssParam = (struct join_bss_param 
*)pstrHostIFconnectAttr->params;
-   if (ptstrJoinBssParam == NULL) {
+   if (!ptstrJoinBssParam) {
PRINT_ER("Required BSSID not found\n");
result = -ENOENT;
goto ERRORHANDLER;
}
 
-   if (pstrHostIFconnectAttr->bssid != NULL) {
+   if (pstrHostIFconnectAttr->bssid) {
hif_drv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, GFP_KERNEL);
memcpy(hif_drv->strWILC_UsrConnReq.pu8bssid, 
pstrHostIFconnectAttr->bssid, 6);
}
 
hif_drv->strWILC_UsrConnReq.ssidLen = pstrHostIFconnectAttr->ssid_len;
-   if (pstrHostIFconnectAttr->ssid != NULL) {
+   if (pstrHostIFconnectAttr->ssid) {
hif_drv->strWILC_UsrConnReq.pu8ssid = 
kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL);
memcpy(hif_drv->strWILC_UsrConnReq.pu8ssid,
   pstrHostIFconnectAttr->ssid,
@@ -1034,7 +1035,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
}
 
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen = 
pstrHostIFconnectAttr->ies_len;
-   if (pstrHostIFconnectAttr->ies != NULL) {
+   if (pstrHostIFconnectAttr->ies) {
hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs = 
kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL);
memcpy(hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs,
   pstrHostIFconnectAttr->ies,
@@ -1112,15 +1113,14 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
join_req_size = strWIDList[u32WidsCount].size;
join_req = kmalloc(join_req_size, GFP_KERNEL);
}
-   if (strWIDList[u32WidsCount].val == NULL) {
+   if (!strWIDList[u32WidsCount].val) {
result = -EFAULT;
goto ERRORHANDLER;
}
 
pu8CurrByte = strWIDList[u32WidsCount].val;
 
-
-   if (

[PATCH V2 34/40] staging: wilc1000: rename variable gu8FlushedJoinReqDrvHandler

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8FlushedJoinReqDrvHandler to join_req_drv
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:270:20: sparse: symbol
   'join_req_drv' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)
 mode change 100755 => 100644 drivers/staging/wilc1000/host_interface.c

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
old mode 100755
new mode 100644
index 9d747b5..0b3c991
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -267,7 +267,7 @@ static u8 mode_11i;
 static u8 auth_type;
 static u32 join_req_size;
 static u32 info_element_size;
-struct host_if_drv *gu8FlushedJoinReqDrvHandler;
+static struct host_if_drv *join_req_drv;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
 #define FLUSHED_BYTE_POS 79
@@ -1210,7 +1210,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
memcpy(join_req, pu8CurrByte, join_req_size);
-   gu8FlushedJoinReqDrvHandler = hif_drv;
+   join_req_drv = hif_drv;
}
 
PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
@@ -1331,7 +1331,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
u32WidsCount++;
 
s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
-  
get_id_from_handler(gu8FlushedJoinReqDrvHandler));
+  get_id_from_handler(join_req_drv));
if (s32Error) {
PRINT_ER("failed to send config packet\n");
s32Error = -EINVAL;
@@ -1406,12 +1406,12 @@ static s32 Handle_ConnectTimeout(struct host_if_drv 
*hif_drv)
 
eth_zero_addr(u8ConnectedSSID);
 
-   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) {
+   if (join_req != NULL && join_req_drv == hif_drv) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) {
+   if (info_element != NULL && join_req_drv == hif_drv) {
kfree(info_element);
info_element = NULL;
}
@@ -1710,12 +1710,12 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen = 0;
kfree(hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs);
 
-   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
+   if (join_req != NULL && join_req_drv == hif_drv) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element != NULL && gu8FlushedJoinReqDrvHandler 
== hif_drv) {
+   if (info_element != NULL && join_req_drv == hif_drv) {
kfree(info_element);
info_element = NULL;
}
@@ -2103,12 +2103,12 @@ static void Handle_Disconnect(struct host_if_drv 
*hif_drv)
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen = 0;
kfree(hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs);
 
-   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) 
{
+   if (join_req != NULL && join_req_drv == hif_drv) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
+   if (info_element != NULL && join_req_drv == hif_drv) {
kfree(info_element);
info_element = NULL;
}
-- 
1.9.1

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


[PATCH V2 25/40] staging: wilc1000: rename variable gu32InactiveTime

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu32InactiveTime to inactive_time
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 59cbf90..ea3c011 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -258,7 +258,7 @@ static s8 link_speed;
 static u8 ch_no;
 static u8 set_ip[2][4];
 static u8 get_ip[2][4];
-static u32 gu32InactiveTime;
+static u32 inactive_time;
 static u8 gu8DelBcn;
 static u32 gu32WidConnRstHack;
 
@@ -2287,7 +2287,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv 
*hif_drv,
 
strWID.id = (u16)WID_GET_INACTIVE_TIME;
strWID.type = WID_INT;
-   strWID.val = (s8 *)&gu32InactiveTime;
+   strWID.val = (s8 *)&inactive_time;
strWID.size = sizeof(u32);
 
 
@@ -2299,8 +2299,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv 
*hif_drv,
return -EFAULT;
}
 
-
-   PRINT_D(CFG80211_DBG, "Getting inactive time : %d\n", gu32InactiveTime);
+   PRINT_D(CFG80211_DBG, "Getting inactive time : %d\n", inactive_time);
 
up(&hif_drv->hSemInactiveTime);
 
@@ -3885,7 +3884,7 @@ s32 host_int_get_inactive_time(struct host_if_drv 
*hif_drv,
 
down(&hif_drv->hSemInactiveTime);
 
-   *pu32InactiveTime = gu32InactiveTime;
+   *pu32InactiveTime = inactive_time;
 
return s32Error;
 }
-- 
1.9.1

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


[PATCH V2 31/40] staging: wilc1000: rename variable gu8FlushedAuthType

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8FlushedAuthType to auth_type
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:267:4: sparse: symbol
   'auth_type' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e15aeb1..f06280b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -264,7 +264,7 @@ static u8 del_beacon;
 static u8 *join_req;
 static u8 *info_element;
 static u8 mode_11i;
-u8 gu8FlushedAuthType;
+static u8 auth_type;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
 struct host_if_drv *gu8FlushedJoinReqDrvHandler;
@@ -1100,7 +1100,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
-   gu8FlushedAuthType = 
(u8)hif_drv->strWILC_UsrConnReq.tenuAuth_type;
+   auth_type = (u8)hif_drv->strWILC_UsrConnReq.tenuAuth_type;
 
PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n", 
hif_drv->strWILC_UsrConnReq.tenuAuth_type);
PRINT_D(HOSTINF_DBG, "Connecting to network of SSID %s on channel %d\n",
@@ -1317,7 +1317,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
strWIDList[u32WidsCount].id = (u16)WID_AUTH_TYPE;
strWIDList[u32WidsCount].type = WID_CHAR;
strWIDList[u32WidsCount].size = sizeof(char);
-   strWIDList[u32WidsCount].val = (s8 *)(&gu8FlushedAuthType);
+   strWIDList[u32WidsCount].val = (s8 *)(&auth_type);
u32WidsCount++;
 
strWIDList[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED;
-- 
1.9.1

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


[PATCH V2 29/40] staging: wilc1000: rename variable gu8FlushedInfoElemAsoc

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8FlushedInfoElemAsoc to info_element
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
- drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol
  'info_element' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a97583a..db63886 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -262,7 +262,7 @@ static u32 inactive_time;
 static u8 del_beacon;
 
 static u8 *join_req;
-u8 *gu8FlushedInfoElemAsoc;
+static u8 *info_element;
 u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
@@ -1076,8 +1076,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
 
gu32FlushedInfoElemAsocSize = 
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen;
-   gu8FlushedInfoElemAsoc =  
kmalloc(gu32FlushedInfoElemAsocSize, GFP_KERNEL);
-   memcpy(gu8FlushedInfoElemAsoc, 
hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs,
+   info_element = kmalloc(gu32FlushedInfoElemAsocSize, 
GFP_KERNEL);
+   memcpy(info_element, 
hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs,
   gu32FlushedInfoElemAsocSize);
}
}
@@ -1302,7 +1302,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
 
strWIDList[u32WidsCount].id = WID_INFO_ELEMENT_ASSOCIATE;
strWIDList[u32WidsCount].type = WID_BIN_DATA;
-   strWIDList[u32WidsCount].val = gu8FlushedInfoElemAsoc;
+   strWIDList[u32WidsCount].val = info_element;
strWIDList[u32WidsCount].size = gu32FlushedInfoElemAsocSize;
u32WidsCount++;
 
@@ -1411,9 +1411,10 @@ static s32 Handle_ConnectTimeout(struct host_if_drv 
*hif_drv)
kfree(join_req);
join_req = NULL;
}
-   if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
-   kfree(gu8FlushedInfoElemAsoc);
-   gu8FlushedInfoElemAsoc = NULL;
+
+   if (info_element != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) {
+   kfree(info_element);
+   info_element = NULL;
}
 
return s32Error;
@@ -1714,9 +1715,10 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
kfree(join_req);
join_req = NULL;
}
-   if (gu8FlushedInfoElemAsoc != NULL && 
gu8FlushedJoinReqDrvHandler == hif_drv) {
-   kfree(gu8FlushedInfoElemAsoc);
-   gu8FlushedInfoElemAsoc = NULL;
+
+   if (info_element != NULL && gu8FlushedJoinReqDrvHandler 
== hif_drv) {
+   kfree(info_element);
+   info_element = NULL;
}
 
hif_drv->enuHostIFstate = HOST_IF_IDLE;
@@ -2106,9 +2108,10 @@ static void Handle_Disconnect(struct host_if_drv 
*hif_drv)
kfree(join_req);
join_req = NULL;
}
-   if (gu8FlushedInfoElemAsoc != NULL && 
gu8FlushedJoinReqDrvHandler == hif_drv) {
-   kfree(gu8FlushedInfoElemAsoc);
-   gu8FlushedInfoElemAsoc = NULL;
+
+   if (info_element != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
+   kfree(info_element);
+   info_element = NULL;
}
 
}
-- 
1.9.1

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


[PATCH V2 30/40] staging: wilc1000: rename variable gu8Flushed11iMode

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8Flushed11iMode to mode_11i
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol
   'mode_11i' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index db63886..e15aeb1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -263,7 +263,7 @@ static u8 del_beacon;
 
 static u8 *join_req;
 static u8 *info_element;
-u8 gu8Flushed11iMode;
+static u8 mode_11i;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
@@ -1088,7 +1088,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
-   gu8Flushed11iMode = hif_drv->strWILC_UsrConnReq.u8security;
+   mode_11i = hif_drv->strWILC_UsrConnReq.u8security;
 
PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", 
hif_drv->strWILC_UsrConnReq.u8security);
 
@@ -1309,7 +1309,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
strWIDList[u32WidsCount].id = (u16)WID_11I_MODE;
strWIDList[u32WidsCount].type = WID_CHAR;
strWIDList[u32WidsCount].size = sizeof(char);
-   strWIDList[u32WidsCount].val = (s8 *)(&(gu8Flushed11iMode));
+   strWIDList[u32WidsCount].val = (s8 *)(&(mode_11i));
u32WidsCount++;
 
 
-- 
1.9.1

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


[PATCH V2 33/40] staging: wilc1000: rename variable gu32FlushedInfoElemAsocSize

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu32FlushedInfoElemAsocSize to info_element_size
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol
   'info_element_size' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)
 mode change 100644 => 100755 drivers/staging/wilc1000/host_interface.c

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
old mode 100644
new mode 100755
index f41a365..9d747b5
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -266,7 +266,7 @@ static u8 *info_element;
 static u8 mode_11i;
 static u8 auth_type;
 static u32 join_req_size;
-u32 gu32FlushedInfoElemAsocSize;
+static u32 info_element_size;
 struct host_if_drv *gu8FlushedJoinReqDrvHandler;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
@@ -1074,11 +1074,10 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
-
-   gu32FlushedInfoElemAsocSize = 
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen;
-   info_element = kmalloc(gu32FlushedInfoElemAsocSize, 
GFP_KERNEL);
+   info_element_size = 
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen;
+   info_element = kmalloc(info_element_size, GFP_KERNEL);
memcpy(info_element, 
hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs,
-  gu32FlushedInfoElemAsocSize);
+  info_element_size);
}
}
strWIDList[u32WidsCount].id = (u16)WID_11I_MODE;
@@ -1303,7 +1302,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
strWIDList[u32WidsCount].id = WID_INFO_ELEMENT_ASSOCIATE;
strWIDList[u32WidsCount].type = WID_BIN_DATA;
strWIDList[u32WidsCount].val = info_element;
-   strWIDList[u32WidsCount].size = gu32FlushedInfoElemAsocSize;
+   strWIDList[u32WidsCount].size = info_element_size;
u32WidsCount++;
 
strWIDList[u32WidsCount].id = (u16)WID_11I_MODE;
-- 
1.9.1

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


[PATCH V2 24/40] staging: wilc1000: rename variable gs8GetIP

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gs8GetIP to get_ip
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 7e436fb..59cbf90 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -257,7 +257,7 @@ static s8 rssi;
 static s8 link_speed;
 static u8 ch_no;
 static u8 set_ip[2][4];
-static u8 gs8GetIP[2][4];
+static u8 get_ip[2][4];
 static u32 gu32InactiveTime;
 static u8 gu8DelBcn;
 static u32 gu32WidConnRstHack;
@@ -456,11 +456,11 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
 
PRINT_INFO(HOSTINF_DBG, "%pI4\n", strWID.val);
 
-   memcpy(gs8GetIP[idx], strWID.val, IP_ALEN);
+   memcpy(get_ip[idx], strWID.val, IP_ALEN);
 
kfree(strWID.val);
 
-   if (memcmp(gs8GetIP[idx], set_ip[idx], IP_ALEN) != 0)
+   if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0)
host_int_setup_ipaddress(hif_drv, set_ip[idx], idx);
 
if (s32Error != 0) {
@@ -469,7 +469,7 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
}
 
PRINT_INFO(HOSTINF_DBG, "IP address retrieved:: u8IfIdx = %d\n", idx);
-   PRINT_INFO(HOSTINF_DBG, "%pI4\n", gs8GetIP[idx]);
+   PRINT_INFO(HOSTINF_DBG, "%pI4\n", get_ip[idx]);
PRINT_INFO(HOSTINF_DBG, "\n");
 
return s32Error;
-- 
1.9.1

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


[PATCH V2 32/40] staging: wilc1000: rename variable gu32FlushedJoinReqSize

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu32FlushedJoinReqSize to join_req_size
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol
   'join_req_size' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index f06280b..f41a365 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -265,7 +265,7 @@ static u8 *join_req;
 static u8 *info_element;
 static u8 mode_11i;
 static u8 auth_type;
-u32 gu32FlushedJoinReqSize;
+static u32 join_req_size;
 u32 gu32FlushedInfoElemAsocSize;
 struct host_if_drv *gu8FlushedJoinReqDrvHandler;
 #define REAL_JOIN_REQ 0
@@ -1112,8 +1112,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
strWIDList[u32WidsCount].val = kmalloc(strWIDList[u32WidsCount].size, 
GFP_KERNEL);
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
-   gu32FlushedJoinReqSize = strWIDList[u32WidsCount].size;
-   join_req = kmalloc(gu32FlushedJoinReqSize, GFP_KERNEL);
+   join_req_size = strWIDList[u32WidsCount].size;
+   join_req = kmalloc(join_req_size, GFP_KERNEL);
}
if (strWIDList[u32WidsCount].val == NULL) {
s32Error = -EFAULT;
@@ -1210,7 +1210,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
-   memcpy(join_req, pu8CurrByte, gu32FlushedJoinReqSize);
+   memcpy(join_req, pu8CurrByte, join_req_size);
gu8FlushedJoinReqDrvHandler = hif_drv;
}
 
@@ -1322,7 +1322,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
 
strWIDList[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED;
strWIDList[u32WidsCount].type = WID_STR;
-   strWIDList[u32WidsCount].size = gu32FlushedJoinReqSize;
+   strWIDList[u32WidsCount].size = join_req_size;
strWIDList[u32WidsCount].val = (s8 *)join_req;
pu8CurrByte = strWIDList[u32WidsCount].val;
 
-- 
1.9.1

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


[PATCH V2 26/40] staging: wilc1000: rename variable gu8DelBcn

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8DelBcn to del_beacon
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index ea3c011..9f5db14 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -259,7 +259,7 @@ static u8 ch_no;
 static u8 set_ip[2][4];
 static u8 get_ip[2][4];
 static u32 inactive_time;
-static u8 gu8DelBcn;
+static u8 del_beacon;
 static u32 gu32WidConnRstHack;
 
 u8 *gu8FlushedJoinReq;
@@ -2373,7 +2373,7 @@ static void Handle_DelBeacon(struct host_if_drv *hif_drv)
strWID.id = (u16)WID_DEL_BEACON;
strWID.type = WID_CHAR;
strWID.size = sizeof(char);
-   strWID.val = &gu8DelBcn;
+   strWID.val = &del_beacon;
 
if (strWID.val == NULL)
return;
-- 
1.9.1

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


[PATCH V2 27/40] staging: wilc1000: remove unused variable gu32WidConnRstHack

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch removes unused the variable gu32WidConnRstHack.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 9f5db14..82d058f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -260,7 +260,6 @@ static u8 set_ip[2][4];
 static u8 get_ip[2][4];
 static u32 inactive_time;
 static u8 del_beacon;
-static u32 gu32WidConnRstHack;
 
 u8 *gu8FlushedJoinReq;
 u8 *gu8FlushedInfoElemAsoc;
@@ -1209,7 +1208,6 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
 
pu8CurrByte = strWIDList[u32WidsCount].val;
u32WidsCount++;
-   gu32WidConnRstHack = 0;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize);
-- 
1.9.1

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


[PATCH V2 28/40] staging: wilc1000: rename variable gu8FlushedJoinReq

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8FlushedJoinReq to join_req
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol
   'join_req' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 82d058f..a97583a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -261,7 +261,7 @@ static u8 get_ip[2][4];
 static u32 inactive_time;
 static u8 del_beacon;
 
-u8 *gu8FlushedJoinReq;
+static u8 *join_req;
 u8 *gu8FlushedInfoElemAsoc;
 u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
@@ -1113,7 +1113,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
gu32FlushedJoinReqSize = strWIDList[u32WidsCount].size;
-   gu8FlushedJoinReq = kmalloc(gu32FlushedJoinReqSize, GFP_KERNEL);
+   join_req = kmalloc(gu32FlushedJoinReqSize, GFP_KERNEL);
}
if (strWIDList[u32WidsCount].val == NULL) {
s32Error = -EFAULT;
@@ -1210,7 +1210,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
-   memcpy(gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize);
+   memcpy(join_req, pu8CurrByte, gu32FlushedJoinReqSize);
gu8FlushedJoinReqDrvHandler = hif_drv;
}
 
@@ -1323,7 +1323,7 @@ static s32 Handle_FlushConnect(struct host_if_drv 
*hif_drv)
strWIDList[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED;
strWIDList[u32WidsCount].type = WID_STR;
strWIDList[u32WidsCount].size = gu32FlushedJoinReqSize;
-   strWIDList[u32WidsCount].val = (s8 *)gu8FlushedJoinReq;
+   strWIDList[u32WidsCount].val = (s8 *)join_req;
pu8CurrByte = strWIDList[u32WidsCount].val;
 
pu8CurrByte += FLUSHED_BYTE_POS;
@@ -1407,9 +1407,9 @@ static s32 Handle_ConnectTimeout(struct host_if_drv 
*hif_drv)
 
eth_zero_addr(u8ConnectedSSID);
 
-   if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
-   kfree(gu8FlushedJoinReq);
-   gu8FlushedJoinReq = NULL;
+   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) {
+   kfree(join_req);
+   join_req = NULL;
}
if (gu8FlushedInfoElemAsoc != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
kfree(gu8FlushedInfoElemAsoc);
@@ -1710,9 +1710,9 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen = 0;
kfree(hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs);
 
-   if (gu8FlushedJoinReq != NULL && 
gu8FlushedJoinReqDrvHandler == hif_drv) {
-   kfree(gu8FlushedJoinReq);
-   gu8FlushedJoinReq = NULL;
+   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
+   kfree(join_req);
+   join_req = NULL;
}
if (gu8FlushedInfoElemAsoc != NULL && 
gu8FlushedJoinReqDrvHandler == hif_drv) {
kfree(gu8FlushedInfoElemAsoc);
@@ -2102,9 +2102,9 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
hif_drv->strWILC_UsrConnReq.ConnReqIEsLen = 0;
kfree(hif_drv->strWILC_UsrConnReq.pu8ConnReqIEs);
 
-   if (gu8FlushedJoinReq != NULL && gu8FlushedJoinReqDrvHandler == 
hif_drv) {
-   kfree(gu8FlushedJoinReq);
-   gu8FlushedJoinReq = NULL;
+   if (join_req != NULL && gu8FlushedJoinReqDrvHandler == hif_drv) 
{
+   kfree(join_req);
+   join_req = NULL;
}
if (gu8FlushedInfoElemAsoc != NULL && 
gu8FlushedJoinReqDrvHandler == hif_drv) {
kfree(gu8FlushedInfoElemAsoc);
@@ -3634,7 +3634,7 @@ s32 host_int_flush_join_req(struct host_if_drv *hif_drv)
s32 s32Error = 0;
struct host_if_msg msg;
 
-   if (!gu8FlushedJoinReq) {
+   if (!join_req) {
s32Error = -EFAULT;
return s32Error;
}
-- 
1.9.1

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


[PATCH V2 21/40] staging: wilc1000: rename variable gs8lnkspd

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gs8lnkspd to link_speed.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index eda6382..2648e43 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -254,7 +254,7 @@ static u8 rcv_assoc_resp[MAX_ASSOC_RESP_FRAME_SIZE];
 static bool scan_while_connected;
 
 static s8 rssi;
-static s8 gs8lnkspd;
+static s8 link_speed;
 static u8 gu8Chnl;
 static u8 gs8SetIP[2][4];
 static u8 gs8GetIP[2][4];
@@ -2188,11 +2188,11 @@ static void Handle_GetLinkspeed(struct host_if_drv 
*hif_drv)
s32 s32Error = 0;
struct wid strWID;
 
-   gs8lnkspd = 0;
+   link_speed = 0;
 
strWID.id = (u16)WID_LINKSPEED;
strWID.type = WID_CHAR;
-   strWID.val = &gs8lnkspd;
+   strWID.val = &link_speed;
strWID.size = sizeof(char);
 
PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
@@ -3971,9 +3971,7 @@ s32 host_int_get_link_speed(struct host_if_drv *hif_drv, 
s8 *ps8lnkspd)
return -EFAULT;
}
 
-
-   *ps8lnkspd = gs8lnkspd;
-
+   *ps8lnkspd = link_speed;
 
return s32Error;
 }
-- 
1.9.1

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


[PATCH V2 23/40] staging: wilc1000: rename variable gs8SetIP

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gs8SetIP to set_ip
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c9126d0..7e436fb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -256,7 +256,7 @@ static bool scan_while_connected;
 static s8 rssi;
 static s8 link_speed;
 static u8 ch_no;
-static u8 gs8SetIP[2][4];
+static u8 set_ip[2][4];
 static u8 gs8GetIP[2][4];
 static u32 gu32InactiveTime;
 static u8 gu8DelBcn;
@@ -417,7 +417,7 @@ s32 Handle_set_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
 
PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set  IP = %pI4\n", idx, 
pu8IPAddr);
 
-   memcpy(gs8SetIP[idx], pu8IPAddr, IP_ALEN);
+   memcpy(set_ip[idx], pu8IPAddr, IP_ALEN);
 
strWID.id = (u16)WID_IP_ADDRESS;
strWID.type = WID_STR;
@@ -460,8 +460,8 @@ s32 Handle_get_IPAddress(struct host_if_drv *hif_drv, u8 
*pu8IPAddr, u8 idx)
 
kfree(strWID.val);
 
-   if (memcmp(gs8GetIP[idx], gs8SetIP[idx], IP_ALEN) != 0)
-   host_int_setup_ipaddress(hif_drv, gs8SetIP[idx], idx);
+   if (memcmp(gs8GetIP[idx], set_ip[idx], IP_ALEN) != 0)
+   host_int_setup_ipaddress(hif_drv, set_ip[idx], idx);
 
if (s32Error != 0) {
PRINT_ER("Failed to get IP address\n");
-- 
1.9.1

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


[PATCH V2 22/40] staging: wilc1000: rename variable gu8Chnl

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gu8Chnl to ch_no
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 2648e43..c9126d0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -255,7 +255,7 @@ static bool scan_while_connected;
 
 static s8 rssi;
 static s8 link_speed;
-static u8 gu8Chnl;
+static u8 ch_no;
 static u8 gs8SetIP[2][4];
 static u8 gs8GetIP[2][4];
 static u32 gu32InactiveTime;
@@ -2137,7 +2137,7 @@ static s32 Handle_GetChnl(struct host_if_drv *hif_drv)
 
strWID.id = (u16)WID_CURRENT_CHANNEL;
strWID.type = WID_CHAR;
-   strWID.val = (s8 *)&gu8Chnl;
+   strWID.val = (s8 *)&ch_no;
strWID.size = sizeof(char);
 
PRINT_D(HOSTINF_DBG, "Getting channel value\n");
@@ -3852,7 +3852,7 @@ s32 host_int_get_host_chnl_num(struct host_if_drv 
*hif_drv, u8 *pu8ChNo)
PRINT_ER("wilc mq send fail\n");
down(&hif_drv->hSemGetCHNL);
 
-   *pu8ChNo = gu8Chnl;
+   *pu8ChNo = ch_no;
 
return s32Error;
 
-- 
1.9.1

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


[PATCH V2 20/40] staging: wilc1000: rename variable gs8Rssi

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gs8Rssi to rssi
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e309197..eda6382 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -253,7 +253,7 @@ static u8 rcv_assoc_resp[MAX_ASSOC_RESP_FRAME_SIZE];
 
 static bool scan_while_connected;
 
-static s8 gs8Rssi;
+static s8 rssi;
 static s8 gs8lnkspd;
 static u8 gu8Chnl;
 static u8 gs8SetIP[2][4];
@@ -2165,7 +2165,7 @@ static void Handle_GetRssi(struct host_if_drv *hif_drv)
 
strWID.id = (u16)WID_RSSI;
strWID.type = WID_CHAR;
-   strWID.val = &gs8Rssi;
+   strWID.val = &rssi;
strWID.size = sizeof(char);
 
PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
@@ -3943,9 +3943,7 @@ s32 host_int_get_rssi(struct host_if_drv *hif_drv, s8 
*ps8Rssi)
return -EFAULT;
}
 
-
-   *ps8Rssi = gs8Rssi;
-
+   *ps8Rssi = rssi;
 
return s32Error;
 }
-- 
1.9.1

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


[PATCH V2 19/40] staging: wilc1000: rename variable gbScanWhileConnected

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gbScanWhileConnected to scan_while_connected
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol
   'scan_while_connected' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5112aee..e309197 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -251,7 +251,7 @@ u8 
gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 
 static u8 rcv_assoc_resp[MAX_ASSOC_RESP_FRAME_SIZE];
 
-bool gbScanWhileConnected;
+static bool scan_while_connected;
 
 static s8 gs8Rssi;
 static s8 gs8lnkspd;
@@ -918,9 +918,9 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
u32WidsCount++;
 
if (hif_drv->enuHostIFstate == HOST_IF_CONNECTED)
-   gbScanWhileConnected = true;
+   scan_while_connected = true;
else if (hif_drv->enuHostIFstate == HOST_IF_IDLE)
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
 
s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
   get_id_from_handler(hif_drv));
@@ -1357,8 +1357,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv 
*hif_drv)
 
hif_drv->enuHostIFstate = HOST_IF_IDLE;
 
-   gbScanWhileConnected = false;
-
+   scan_while_connected = false;
 
memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));
 
@@ -1658,7 +1657,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
} else {
PRINT_D(HOSTINF_DBG, "MAC status : %d and 
Connect Status : %d\n", u8MacStatus, strConnectInfo.u16ConnectStatus);
hif_drv->enuHostIFstate = HOST_IF_IDLE;
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
}
 
if (strConnectInfo.pu8RespIEs != NULL) {
@@ -1723,7 +1722,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
}
 
hif_drv->enuHostIFstate = HOST_IF_IDLE;
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
 
} else if ((u8MacStatus == MAC_DISCONNECTED) &&
   (hif_drv->strWILC_UsrScanReq.pfUserScanResult != 
NULL)) {
@@ -2093,7 +2092,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
PRINT_ER("strWILC_UsrConnReq.pfUserConnectResult = 
NULL\n");
}
 
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
 
hif_drv->enuHostIFstate = HOST_IF_IDLE;
 
@@ -4225,7 +4224,7 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
 
PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", 
clients_count + 1);
 
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
 
sema_init(&hif_sema_wait_response, 0);
 
@@ -4361,7 +4360,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
 
hif_drv->enuHostIFstate = HOST_IF_IDLE;
 
-   gbScanWhileConnected = false;
+   scan_while_connected = false;
 
memset(&msg, 0, sizeof(struct host_if_msg));
 
-- 
1.9.1

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


[PATCH V2 15/40] staging: wilc1000: rename variable hWaitResponse

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable hWaitResponse to hif_sema_wait_response
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 32c73b1..9346d42 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -243,7 +243,7 @@ static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hif_sema_thread;
 static struct semaphore hif_sema_driver;
-static struct semaphore hWaitResponse;
+static struct semaphore hif_sema_wait_response;
 struct semaphore hSemHostIntDeinit;
 struct timer_list g_hPeriodicRSSI;
 
@@ -526,7 +526,7 @@ static s32 Handle_GetMacAddress(struct host_if_drv *hif_drv,
PRINT_ER("Failed to get mac address\n");
s32Error = -EFAULT;
}
-   up(&hWaitResponse);
+   up(&hif_sema_wait_response);
 
return s32Error;
 }
@@ -817,7 +817,7 @@ ERRORHANDLER:
 static s32 Handle_wait_msg_q_empty(void)
 {
g_wilc_initialized = 0;
-   up(&hWaitResponse);
+   up(&hif_sema_wait_response);
return 0;
 }
 
@@ -2253,7 +2253,7 @@ s32 Handle_GetStatistics(struct host_if_drv *hif_drv, 
struct rf_info *pstrStatis
if (s32Error)
PRINT_ER("Failed to send scan paramters config packet\n");
 
-   up(&hWaitResponse);
+   up(&hif_sema_wait_response);
return 0;
 
 }
@@ -2508,7 +2508,7 @@ static void Handle_DelAllSta(struct host_if_drv *hif_drv,
 ERRORHANDLER:
kfree(strWID.val);
 
-   up(&hWaitResponse);
+   up(&hif_sema_wait_response);
 }
 
 static void Handle_DelStation(struct host_if_drv *hif_drv,
@@ -2908,7 +2908,7 @@ static s32 Handle_DelAllRxBASessions(struct host_if_drv 
*hif_drv,
if (strWID.val != NULL)
kfree(strWID.val);
 
-   up(&hWaitResponse);
+   up(&hif_sema_wait_response);
 
return s32Error;
 
@@ -3505,7 +3505,7 @@ s32 host_int_get_MacAddress(struct host_if_drv *hif_drv, 
u8 *pu8MacAddress)
return -EFAULT;
}
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
return s32Error;
 }
 
@@ -3792,7 +3792,7 @@ int host_int_wait_msg_queue_idle(void)
result = -EINVAL;
}
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
 
return result;
 }
@@ -3999,7 +3999,7 @@ s32 host_int_get_statistics(struct host_if_drv *hif_drv, 
struct rf_info *pstrSta
return -EFAULT;
}
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
return s32Error;
 }
 
@@ -4229,7 +4229,7 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
 
gbScanWhileConnected = false;
 
-   sema_init(&hWaitResponse, 0);
+   sema_init(&hif_sema_wait_response, 0);
 
hif_drv  = kzalloc(sizeof(struct host_if_drv), GFP_KERNEL);
if (!hif_drv) {
@@ -4795,7 +4795,7 @@ s32 host_int_del_allstation(struct host_if_drv *hif_drv,
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
 
return s32Error;
 
@@ -5091,7 +5091,7 @@ s32 host_int_delBASession(struct host_if_drv *hif_drv, 
char *pBSSID, char TID)
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
 
return s32Error;
 }
@@ -5121,7 +5121,7 @@ s32 host_int_del_All_Rx_BASession(struct host_if_drv 
*hif_drv,
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
 
-   down(&hWaitResponse);
+   down(&hif_sema_wait_response);
 
return s32Error;
 }
-- 
1.9.1

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


[PATCH v2 18/40] staging: wilc1000: rename variable gapu8RcvdAssocResp

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gapu8RcvdAssocResp to rcv_assoc_resp
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8c529d1..5112aee 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -249,7 +249,7 @@ static struct timer_list periodic_rssi;
 
 u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 
-static u8 gapu8RcvdAssocResp[MAX_ASSOC_RESP_FRAME_SIZE];
+static u8 rcv_assoc_resp[MAX_ASSOC_RESP_FRAME_SIZE];
 
 bool gbScanWhileConnected;
 
@@ -1567,10 +1567,10 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));
 
if (u8MacStatus == MAC_CONNECTED) {
-   memset(gapu8RcvdAssocResp, 0, 
MAX_ASSOC_RESP_FRAME_SIZE);
+   memset(rcv_assoc_resp, 0, 
MAX_ASSOC_RESP_FRAME_SIZE);
 
host_int_get_assoc_res_info(hif_drv,
-   gapu8RcvdAssocResp,
+   rcv_assoc_resp,

MAX_ASSOC_RESP_FRAME_SIZE,

&u32RcvdAssocRespInfoLen);
 
@@ -1579,7 +1579,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
if (u32RcvdAssocRespInfoLen != 0) {
 
PRINT_D(HOSTINF_DBG, "Parsing 
association response\n");
-   s32Err = 
ParseAssocRespInfo(gapu8RcvdAssocResp, u32RcvdAssocRespInfoLen,
+   s32Err = 
ParseAssocRespInfo(rcv_assoc_resp, u32RcvdAssocRespInfoLen,

&pstrConnectRespInfo);
if (s32Err) {
PRINT_ER("ParseAssocRespInfo() 
returned error %d\n", s32Err);
-- 
1.9.1

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


[PATCH V2 17/40] staging: wilc1000: rename variable g_hPeriodicRSSI

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable g_hPeriodicRSSI to periodic_rssi
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol
   'periodic_rssi' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5900972..8c529d1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -245,9 +245,7 @@ static struct semaphore hif_sema_thread;
 static struct semaphore hif_sema_driver;
 static struct semaphore hif_sema_wait_response;
 static struct semaphore hif_sema_deinit;
-struct timer_list g_hPeriodicRSSI;
-
-
+static struct timer_list periodic_rssi;
 
 u8 gau8MulticastMacAddrList[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
 
@@ -4207,8 +4205,8 @@ static void GetPeriodicRSSI(unsigned long arg)
return;
}
}
-   g_hPeriodicRSSI.data = (unsigned long)hif_drv;
-   mod_timer(&g_hPeriodicRSSI, jiffies + msecs_to_jiffies(5000));
+   periodic_rssi.data = (unsigned long)hif_drv;
+   mod_timer(&periodic_rssi, jiffies + msecs_to_jiffies(5000));
 }
 
 
@@ -4276,9 +4274,9 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
result = -EFAULT;
goto _fail_mq_;
}
-   setup_timer(&g_hPeriodicRSSI, GetPeriodicRSSI,
+   setup_timer(&periodic_rssi, GetPeriodicRSSI,
(unsigned long)hif_drv);
-   mod_timer(&g_hPeriodicRSSI, jiffies + msecs_to_jiffies(5000));
+   mod_timer(&periodic_rssi, jiffies + msecs_to_jiffies(5000));
}
 
setup_timer(&hif_drv->hScanTimer, TimerCB_Scan, 0);
@@ -4346,10 +4344,8 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
}
 
-
-   if (del_timer_sync(&g_hPeriodicRSSI)) {
+   if (del_timer_sync(&periodic_rssi))
PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
-   }
 
del_timer_sync(&hif_drv->hRemainOnChannel);
 
@@ -4370,9 +4366,9 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
memset(&msg, 0, sizeof(struct host_if_msg));
 
if (clients_count == 1) {
-   if (del_timer_sync(&g_hPeriodicRSSI)) {
+   if (del_timer_sync(&periodic_rssi))
PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
-   }
+
msg.id = HOST_IF_MSG_EXIT;
msg.drv = hif_drv;
 
-- 
1.9.1

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


[PATCH V2 16/40] staging: wilc1000: rename variable hSemHostIntDeinit

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable hSemHostIntDeinit to hif_sema_deinit
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol
   'hif_sema_deinit' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 9346d42..5900972 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -244,7 +244,7 @@ static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hif_sema_thread;
 static struct semaphore hif_sema_driver;
 static struct semaphore hif_sema_wait_response;
-struct semaphore hSemHostIntDeinit;
+static struct semaphore hif_sema_deinit;
 struct timer_list g_hPeriodicRSSI;
 
 
@@ -4249,7 +4249,7 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
if (clients_count == 0) {
sema_init(&hif_sema_thread, 0);
sema_init(&hif_sema_driver, 0);
-   sema_init(&hSemHostIntDeinit, 1);
+   sema_init(&hif_sema_deinit, 1);
}
 
sema_init(&hif_drv->hSemTestKeyBlock, 0);
@@ -4333,7 +4333,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
return 0;
}
 
-   down(&hSemHostIntDeinit);
+   down(&hif_sema_deinit);
 
terminated_handle = hif_drv;
PRINT_D(HOSTINF_DBG, "De-initializing host interface for client %d\n", 
clients_count);
@@ -4395,7 +4395,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
 
clients_count--;
terminated_handle = NULL;
-   up(&hSemHostIntDeinit);
+   up(&hif_sema_deinit);
return s32Error;
 }
 
@@ -4438,7 +4438,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
int id;
struct host_if_drv *hif_drv = NULL;
 
-   down(&hSemHostIntDeinit);
+   down(&hif_sema_deinit);
 
id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | 
(pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
hif_drv = get_handler_from_id(id);
@@ -4447,13 +4447,13 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
 
if (!hif_drv || hif_drv == terminated_handle) {
PRINT_D(HOSTINF_DBG, "Wifi driver handler is equal to NULL\n");
-   up(&hSemHostIntDeinit);
+   up(&hif_sema_deinit);
return;
}
 
if (!hif_drv->strWILC_UsrConnReq.pfUserConnectResult) {
PRINT_ER("Received mac status is not needed when there is no 
current Connect Reques\n");
-   up(&hSemHostIntDeinit);
+   up(&hif_sema_deinit);
return;
}
 
@@ -4471,7 +4471,7 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
if (s32Error)
PRINT_ER("Error in sending message queue asynchronous message 
info: Error(%d)\n", s32Error);
 
-   up(&hSemHostIntDeinit);
+   up(&hif_sema_deinit);
 }
 
 void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
-- 
1.9.1

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


[PATCH V2 14/40] staging: wilc1000: rename variable hSemDeinitDrvHandle

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable hSemDeinitDrvHandle to hif_sema_driver
to avoid CamelCase naming convention.

Add to static because follow warning reported by kbuild system.
 - drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol
   'hif_sema_driver' was not declared. Should it be static?

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a587080..32c73b1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -242,7 +242,7 @@ u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hif_sema_thread;
-struct semaphore hSemDeinitDrvHandle;
+static struct semaphore hif_sema_driver;
 static struct semaphore hWaitResponse;
 struct semaphore hSemHostIntDeinit;
 struct timer_list g_hPeriodicRSSI;
@@ -370,8 +370,7 @@ static s32 Handle_SetWfiDrvHandler(struct host_if_drv 
*hif_drv,
   pstrHostIfSetDrvHandler->u32Address);
 
if (!hif_drv)
-   up(&hSemDeinitDrvHandle);
-
+   up(&hif_sema_driver);
 
if (s32Error) {
PRINT_ER("Failed to set driver handler\n");
@@ -398,8 +397,7 @@ static s32 Handle_SetOperationMode(struct host_if_drv 
*hif_drv,
 
 
if ((pstrHostIfSetOperationMode->u32Mode) == IDLE_MODE)
-   up(&hSemDeinitDrvHandle);
-
+   up(&hif_sema_driver);
 
if (s32Error) {
PRINT_ER("Failed to set driver handler\n");
@@ -4250,7 +4248,7 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
PRINT_D(HOSTINF_DBG, "Global handle pointer value=%p\n", hif_drv);
if (clients_count == 0) {
sema_init(&hif_sema_thread, 0);
-   sema_init(&hSemDeinitDrvHandle, 0);
+   sema_init(&hif_sema_driver, 0);
sema_init(&hSemHostIntDeinit, 1);
}
 
@@ -4356,7 +4354,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
del_timer_sync(&hif_drv->hRemainOnChannel);
 
host_int_set_wfi_drv_handler(NULL);
-   down(&hSemDeinitDrvHandle);
+   down(&hif_sema_driver);
 
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) {

hif_drv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, NULL,
-- 
1.9.1

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


[PATCH V2 13/40] staging: wilc1000: rename variable hSemHostIFthrdEnd

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable hSemHostIFthrdEnd to hif_sema_thread
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index bb770ab1..a587080 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -241,8 +241,7 @@ bool g_obtainingIP;
 u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle hif_msg_q;
-static struct semaphore hSemHostIFthrdEnd;
-
+static struct semaphore hif_sema_thread;
 struct semaphore hSemDeinitDrvHandle;
 static struct semaphore hWaitResponse;
 struct semaphore hSemHostIntDeinit;
@@ -3123,7 +3122,7 @@ static int hostIFthread(void *pvArg)
}
 
PRINT_D(HOSTINF_DBG, "Releasing thread exit semaphore\n");
-   up(&hSemHostIFthrdEnd);
+   up(&hif_sema_thread);
return 0;
 }
 
@@ -4250,7 +4249,7 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
 
PRINT_D(HOSTINF_DBG, "Global handle pointer value=%p\n", hif_drv);
if (clients_count == 0) {
-   sema_init(&hSemHostIFthrdEnd, 0);
+   sema_init(&hif_sema_thread, 0);
sema_init(&hSemDeinitDrvHandle, 0);
sema_init(&hSemHostIntDeinit, 1);
}
@@ -4383,7 +4382,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
if (s32Error != 0)
PRINT_ER("Error in sending deinit's message queue 
message function: Error(%d)\n", s32Error);
 
-   down(&hSemHostIFthrdEnd);
+   down(&hif_sema_thread);
 
wilc_mq_destroy(&hif_msg_q);
}
-- 
1.9.1

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


[PATCH V2 10/40] staging: wilc1000: remove unused variable gWFiDrvHandle

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch removes unused the variable gWFiDrvHandle.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 320073e..ad7c102 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -237,7 +237,6 @@ enum scan_conn_timer {
 
 static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
 struct host_if_drv *terminated_handle;
-struct host_if_drv *gWFiDrvHandle;
 bool g_obtainingIP;
 u8 P2P_LISTEN_STATE;
 static struct task_struct *HostIFthreadHandler;
-- 
1.9.1

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


[PATCH V2 12/40] staging: wilc1000: rename variable gMsgQHostIF

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable gMsgQHostIF to hif_msg_q
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 109 +++---
 1 file changed, 53 insertions(+), 56 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4f24a05..bb770ab1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -240,7 +240,7 @@ struct host_if_drv *terminated_handle;
 bool g_obtainingIP;
 u8 P2P_LISTEN_STATE;
 static struct task_struct *hif_thread_handler;
-static WILC_MsgQueueHandle gMsgQHostIF;
+static WILC_MsgQueueHandle hif_msg_q;
 static struct semaphore hSemHostIFthrdEnd;
 
 struct semaphore hSemDeinitDrvHandle;
@@ -2738,7 +2738,7 @@ static void ListenTimerCB(unsigned long arg)
msg.drv = hif_drv;
msg.body.remain_on_ch.u32ListenSessionID = 
hif_drv->strHostIfRemainOnChan.u32ListenSessionID;
 
-   s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("wilc_mq_send fail\n");
 }
@@ -2926,7 +2926,7 @@ static int hostIFthread(void *pvArg)
memset(&msg, 0, sizeof(struct host_if_msg));
 
while (1) {
-   wilc_mq_recv(&gMsgQHostIF, &msg, sizeof(struct host_if_msg), 
&u32Ret);
+   wilc_mq_recv(&hif_msg_q, &msg, sizeof(struct host_if_msg), 
&u32Ret);
hif_drv = (struct host_if_drv *)msg.drv;
if (msg.id == HOST_IF_MSG_EXIT) {
PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
@@ -2936,13 +2936,13 @@ static int hostIFthread(void *pvArg)
if ((!g_wilc_initialized)) {
PRINT_D(GENERIC_DBG, "--WAIT--");
usleep_range(200 * 1000, 200 * 1000);
-   wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct 
host_if_msg));
+   wilc_mq_send(&hif_msg_q, &msg, sizeof(struct 
host_if_msg));
continue;
}
 
if (msg.id == HOST_IF_MSG_CONNECT && 
hif_drv->strWILC_UsrScanReq.pfUserScanResult != NULL) {
PRINT_D(HOSTINF_DBG, "Requeue connect request till scan 
done received\n");
-   wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct 
host_if_msg));
+   wilc_mq_send(&hif_msg_q, &msg, sizeof(struct 
host_if_msg));
usleep_range(2 * 1000, 2 * 1000);
continue;
}
@@ -3136,7 +3136,7 @@ static void TimerCB_Scan(unsigned long arg)
msg.drv = pvArg;
msg.id = HOST_IF_MSG_SCAN_TIMER_FIRED;
 
-   wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 }
 
 static void TimerCB_Connect(unsigned long arg)
@@ -3148,7 +3148,7 @@ static void TimerCB_Connect(unsigned long arg)
msg.drv = pvArg;
msg.id = HOST_IF_MSG_CONNECT_TIMER_FIRED;
 
-   wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 }
 
 s32 host_int_remove_key(struct host_if_drv *hif_drv, const u8 *pu8StaAddress)
@@ -3182,7 +3182,7 @@ int host_int_remove_wep_key(struct host_if_drv *hif_drv, 
u8 index)
msg.drv = hif_drv;
msg.body.key_info.attr.wep.index = index;
 
-   result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
PRINT_ER("Error in sending message queue : Request to remove 
WEP key\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3211,7 +3211,7 @@ s32 host_int_set_WEPDefaultKeyID(struct host_if_drv 
*hif_drv, u8 u8Index)
msg.drv = hif_drv;
msg.body.key_info.attr.wep.index = u8Index;
 
-   s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue : Default key 
index\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3246,7 +3246,7 @@ s32 host_int_add_wep_key_bss_sta(struct host_if_drv 
*hif_drv,
msg.body.key_info.attr.wep.key_len = (u8WepKeylen);
msg.body.key_info.attr.wep.index = u8Keyidx;
 
-   s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+   s32Error = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (s32Error)
PRINT_ER("Error in sending message queue :WEP Key\n");
down(&hif_drv->hSemTestKeyBlock);
@@ -3290,7 +3290,7 @@ s32 host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
msg.body.key_info.attr.wep.mode = u8mode;
 

[PATCH V2 11/40] staging: wilc1000: rename variable HostIFthreadHandler

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames variable HostIFthreadHandler to hif_thread_handler
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index ad7c102..4f24a05 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -239,7 +239,7 @@ static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 
1];
 struct host_if_drv *terminated_handle;
 bool g_obtainingIP;
 u8 P2P_LISTEN_STATE;
-static struct task_struct *HostIFthreadHandler;
+static struct task_struct *hif_thread_handler;
 static WILC_MsgQueueHandle gMsgQHostIF;
 static struct semaphore hSemHostIFthrdEnd;
 
@@ -4271,8 +4271,10 @@ s32 host_int_init(struct host_if_drv **hif_drv_handler)
PRINT_ER("Failed to creat MQ\n");
goto _fail_;
}
-   HostIFthreadHandler = kthread_run(hostIFthread, NULL, 
"WILC_kthread");
-   if (IS_ERR(HostIFthreadHandler)) {
+
+   hif_thread_handler = kthread_run(hostIFthread, NULL, 
"WILC_kthread");
+
+   if (IS_ERR(hif_thread_handler)) {
PRINT_ER("Failed to creat Thread\n");
result = -EFAULT;
goto _fail_mq_;
@@ -4316,7 +4318,7 @@ _fail_timer_2:
up(&hif_drv->gtOsCfgValuesSem);
del_timer_sync(&hif_drv->hConnectTimer);
del_timer_sync(&hif_drv->hScanTimer);
-   kthread_stop(HostIFthreadHandler);
+   kthread_stop(hif_thread_handler);
 _fail_mq_:
wilc_mq_destroy(&gMsgQHostIF);
 _fail_:
-- 
1.9.1

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


[PATCH V2 08/40] staging: wilc1000: rename au8Interval of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames au8Interval of struct join_bss_param to interval
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0c5cf08..5cbba1a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -225,7 +225,7 @@ struct join_bss_param {
u8 cnt;
u8 idx;
u8 duration[4];
-   u8 au8Interval[4];
+   u8 interval[4];
u8 au8StartTime[4];
 };
 
@@ -1205,9 +1205,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
memcpy(pu8CurrByte, ptstrJoinBssParam->duration, 
sizeof(ptstrJoinBssParam->duration));
pu8CurrByte += sizeof(ptstrJoinBssParam->duration);
 
-   memcpy(pu8CurrByte, ptstrJoinBssParam->au8Interval, 
sizeof(ptstrJoinBssParam->au8Interval));
-
-   pu8CurrByte += sizeof(ptstrJoinBssParam->au8Interval);
+   memcpy(pu8CurrByte, ptstrJoinBssParam->interval, 
sizeof(ptstrJoinBssParam->interval));
+   pu8CurrByte += sizeof(ptstrJoinBssParam->interval);
 
memcpy(pu8CurrByte, ptstrJoinBssParam->au8StartTime, 
sizeof(ptstrJoinBssParam->au8StartTime));
 
@@ -5002,7 +5001,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
memcpy(pNewJoinBssParam->duration, pu8IEs + 
u16P2P_count, 4);
u16P2P_count += 4;
 
-   memcpy(pNewJoinBssParam->au8Interval, pu8IEs + 
u16P2P_count, 4);
+   memcpy(pNewJoinBssParam->interval, pu8IEs + 
u16P2P_count, 4);
u16P2P_count += 4;
 
memcpy(pNewJoinBssParam->au8StartTime, pu8IEs + 
u16P2P_count, 4);
-- 
1.9.1

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


[PATCH V2 07/40] staging: wilc1000: rename au8Duration of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames au8Duration of struct join_bss_param to duration
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 75a4279..0c5cf08 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -224,7 +224,7 @@ struct join_bss_param {
u8 ct_window;
u8 cnt;
u8 idx;
-   u8 au8Duration[4];
+   u8 duration[4];
u8 au8Interval[4];
u8 au8StartTime[4];
 };
@@ -1202,9 +1202,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
 
*(pu8CurrByte++) = ptstrJoinBssParam->cnt;
 
-   memcpy(pu8CurrByte, ptstrJoinBssParam->au8Duration, 
sizeof(ptstrJoinBssParam->au8Duration));
-
-   pu8CurrByte += sizeof(ptstrJoinBssParam->au8Duration);
+   memcpy(pu8CurrByte, ptstrJoinBssParam->duration, 
sizeof(ptstrJoinBssParam->duration));
+   pu8CurrByte += sizeof(ptstrJoinBssParam->duration);
 
memcpy(pu8CurrByte, ptstrJoinBssParam->au8Interval, 
sizeof(ptstrJoinBssParam->au8Interval));
 
@@ -5000,7 +4999,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
pNewJoinBssParam->cnt = pu8IEs[index + 11];
u16P2P_count = index + 12;
 
-   memcpy(pNewJoinBssParam->au8Duration, pu8IEs + 
u16P2P_count, 4);
+   memcpy(pNewJoinBssParam->duration, pu8IEs + 
u16P2P_count, 4);
u16P2P_count += 4;
 
memcpy(pNewJoinBssParam->au8Interval, pu8IEs + 
u16P2P_count, 4);
-- 
1.9.1

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


[PATCH V2 06/40] staging: wilc1000: rename u8Index of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames u8Index of struct join_bss_param to idx
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e8a35d3..75a4279 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -223,7 +223,7 @@ struct join_bss_param {
u8 opp_enabled;
u8 ct_window;
u8 cnt;
-   u8 u8Index;
+   u8 idx;
u8 au8Duration[4];
u8 au8Interval[4];
u8 au8StartTime[4];
@@ -1194,8 +1194,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
*(pu8CurrByte++) = ((ptstrJoinBssParam->tsf) >> 16) & 0xFF;
*(pu8CurrByte++) = ((ptstrJoinBssParam->tsf) >> 24) & 0xFF;
 
-   *(pu8CurrByte++) = ptstrJoinBssParam->u8Index;
*(pu8CurrByte++) = ptstrJoinBssParam->opp_enabled;
+   *(pu8CurrByte++) = ptstrJoinBssParam->idx;
 
if (ptstrJoinBssParam->opp_enabled)
*(pu8CurrByte++) = ptstrJoinBssParam->ct_window;
@@ -4984,7 +4984,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
 
pNewJoinBssParam->tsf = 
ptstrNetworkInfo->u32Tsf;
pNewJoinBssParam->noa_enabled = 1;
-   pNewJoinBssParam->u8Index = pu8IEs[index + 9];
+   pNewJoinBssParam->idx = pu8IEs[index + 9];
 
if (pu8IEs[index + 10] & BIT(7)) {
pNewJoinBssParam->opp_enabled = 1;
-- 
1.9.1

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


[PATCH V2 09/40] staging: wilc1000: rename au8StartTime of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames au8StartTime of struct join_bss_param to start_time
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5cbba1a..320073e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -226,7 +226,7 @@ struct join_bss_param {
u8 idx;
u8 duration[4];
u8 interval[4];
-   u8 au8StartTime[4];
+   u8 start_time[4];
 };
 
 enum scan_conn_timer {
@@ -1208,10 +1208,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
memcpy(pu8CurrByte, ptstrJoinBssParam->interval, 
sizeof(ptstrJoinBssParam->interval));
pu8CurrByte += sizeof(ptstrJoinBssParam->interval);
 
-   memcpy(pu8CurrByte, ptstrJoinBssParam->au8StartTime, 
sizeof(ptstrJoinBssParam->au8StartTime));
-
-   pu8CurrByte += sizeof(ptstrJoinBssParam->au8StartTime);
-
+   memcpy(pu8CurrByte, ptstrJoinBssParam->start_time, 
sizeof(ptstrJoinBssParam->start_time));
+   pu8CurrByte += sizeof(ptstrJoinBssParam->start_time);
} else
PRINT_D(HOSTINF_DBG, "NOA not present\n");
 
@@ -5004,7 +5002,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
memcpy(pNewJoinBssParam->interval, pu8IEs + 
u16P2P_count, 4);
u16P2P_count += 4;
 
-   memcpy(pNewJoinBssParam->au8StartTime, pu8IEs + 
u16P2P_count, 4);
+   memcpy(pNewJoinBssParam->start_time, pu8IEs + 
u16P2P_count, 4);
 
index += pu8IEs[index + 1] + 2;
continue;
-- 
1.9.1

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


[PATCH V2 04/40] staging: wilc1000: rename u8CtWindow of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames u8CtWindow of struct join_bss_param to ct_window
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 91e7072..07c5213 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -221,7 +221,7 @@ struct join_bss_param {
u32 tsf;
u8 noa_enabled;
u8 opp_enabled;
-   u8 u8CtWindow;
+   u8 ct_window;
u8 u8Count;
u8 u8Index;
u8 au8Duration[4];
@@ -1198,7 +1198,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
*(pu8CurrByte++) = ptstrJoinBssParam->opp_enabled;
 
if (ptstrJoinBssParam->opp_enabled)
-   *(pu8CurrByte++) = ptstrJoinBssParam->u8CtWindow;
+   *(pu8CurrByte++) = ptstrJoinBssParam->ct_window;
 
*(pu8CurrByte++) = ptstrJoinBssParam->u8Count;
 
@@ -4988,7 +4988,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
 
if (pu8IEs[index + 10] & BIT(7)) {
pNewJoinBssParam->opp_enabled = 1;
-   pNewJoinBssParam->u8CtWindow = 
pu8IEs[index + 10];
+   pNewJoinBssParam->ct_window = 
pu8IEs[index + 10];
} else {
pNewJoinBssParam->opp_enabled = 0;
}
-- 
1.9.1

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


[PATCH V2 05/40] staging: wilc1000: rename u8Count of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames u8Count of struct join_bss_param to cnt
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 07c5213..e8a35d3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -222,7 +222,7 @@ struct join_bss_param {
u8 noa_enabled;
u8 opp_enabled;
u8 ct_window;
-   u8 u8Count;
+   u8 cnt;
u8 u8Index;
u8 au8Duration[4];
u8 au8Interval[4];
@@ -1200,7 +1200,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
if (ptstrJoinBssParam->opp_enabled)
*(pu8CurrByte++) = ptstrJoinBssParam->ct_window;
 
-   *(pu8CurrByte++) = ptstrJoinBssParam->u8Count;
+   *(pu8CurrByte++) = ptstrJoinBssParam->cnt;
 
memcpy(pu8CurrByte, ptstrJoinBssParam->au8Duration, 
sizeof(ptstrJoinBssParam->au8Duration));
 
@@ -4997,7 +4997,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
for (i = 0; i < pu8IEs[index + 7]; i++)
PRINT_D(GENERIC_DBG, " %x\n", 
pu8IEs[index + 9 + i]);
 
-   pNewJoinBssParam->u8Count = pu8IEs[index + 11];
+   pNewJoinBssParam->cnt = pu8IEs[index + 11];
u16P2P_count = index + 12;
 
memcpy(pNewJoinBssParam->au8Duration, pu8IEs + 
u16P2P_count, 4);
-- 
1.9.1

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


[PATCH V2 02/40] staging: wilc1000: rename u8NoaEnbaled of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames u8NoaEnbaled of struct join_bss_param to noa_enabled
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e2588ef..2b8e412 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -219,7 +219,7 @@ struct join_bss_param {
u8 rsn_auth_policy[3];
u8 rsn_cap[2];
u32 tsf;
-   u8 u8NoaEnbaled;
+   u8 noa_enabled;
u8 u8OppEnable;
u8 u8CtWindow;
u8 u8Count;
@@ -1184,9 +1184,9 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
pu8CurrByte += sizeof(ptstrJoinBssParam->rsn_cap);
 
*(pu8CurrByte++) = REAL_JOIN_REQ;
+   *(pu8CurrByte++) = ptstrJoinBssParam->noa_enabled;
 
-   *(pu8CurrByte++) = ptstrJoinBssParam->u8NoaEnbaled;
-   if (ptstrJoinBssParam->u8NoaEnbaled) {
+   if (ptstrJoinBssParam->noa_enabled) {
PRINT_D(HOSTINF_DBG, "NOA present\n");
 
*(pu8CurrByte++) = (ptstrJoinBssParam->tsf) & 0xFF;
@@ -4984,7 +4984,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
u16 u16P2P_count;
 
pNewJoinBssParam->tsf = 
ptstrNetworkInfo->u32Tsf;
-   pNewJoinBssParam->u8NoaEnbaled = 1;
+   pNewJoinBssParam->noa_enabled = 1;
pNewJoinBssParam->u8Index = pu8IEs[index + 9];
 
if (pu8IEs[index + 10] & BIT(7)) {
-- 
1.9.1

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


[PATCH V2 01/40] staging: wilc1000: rename ssidLen of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames ssidLen of struct join_bss_param to ssid_len
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 04f3bc2..e2588ef 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -207,7 +207,7 @@ struct join_bss_param {
u16 cap_info;
u8 au8bssid[6];
char ssid[MAX_SSID_LEN];
-   u8 ssidLen;
+   u8 ssid_len;
u8 supp_rates[MAX_RATES_SUPPORTED + 1];
u8 ht_capable;
u8 wmm_cap;
@@ -4934,7 +4934,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
pNewJoinBssParam->cap_info = ptstrNetworkInfo->u16CapInfo;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 
6);
memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->au8ssid, 
ptstrNetworkInfo->u8SsidLen + 1);
-   pNewJoinBssParam->ssidLen = ptstrNetworkInfo->u8SsidLen;
+   pNewJoinBssParam->ssid_len = ptstrNetworkInfo->u8SsidLen;
memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3);
memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3);
 
-- 
1.9.1

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


[PATCH V2 03/40] staging: wilc1000: rename u8OppEnable of struct join_bss_param

2015-10-15 Thread Tony Cho
From: Leo Kim 

This patch renames u8OppEnable of struct join_bss_param to opp_enabled
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 2b8e412..91e7072 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -220,7 +220,7 @@ struct join_bss_param {
u8 rsn_cap[2];
u32 tsf;
u8 noa_enabled;
-   u8 u8OppEnable;
+   u8 opp_enabled;
u8 u8CtWindow;
u8 u8Count;
u8 u8Index;
@@ -1195,10 +1195,9 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
*(pu8CurrByte++) = ((ptstrJoinBssParam->tsf) >> 24) & 0xFF;
 
*(pu8CurrByte++) = ptstrJoinBssParam->u8Index;
+   *(pu8CurrByte++) = ptstrJoinBssParam->opp_enabled;
 
-   *(pu8CurrByte++) = ptstrJoinBssParam->u8OppEnable;
-
-   if (ptstrJoinBssParam->u8OppEnable)
+   if (ptstrJoinBssParam->opp_enabled)
*(pu8CurrByte++) = ptstrJoinBssParam->u8CtWindow;
 
*(pu8CurrByte++) = ptstrJoinBssParam->u8Count;
@@ -4988,10 +4987,11 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
pNewJoinBssParam->u8Index = pu8IEs[index + 9];
 
if (pu8IEs[index + 10] & BIT(7)) {
-   pNewJoinBssParam->u8OppEnable = 1;
+   pNewJoinBssParam->opp_enabled = 1;
pNewJoinBssParam->u8CtWindow = 
pu8IEs[index + 10];
-   } else
-   pNewJoinBssParam->u8OppEnable = 0;
+   } else {
+   pNewJoinBssParam->opp_enabled = 0;
+   }
 
PRINT_D(GENERIC_DBG, "P2P Dump\n");
for (i = 0; i < pu8IEs[index + 7]; i++)
-- 
1.9.1

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


Re: [PATCH 02/10] staging: most: fix usage of false data type

2015-10-15 Thread Christian Gromm
On Thu, 15 Oct 2015 15:47:39 +0300
Dan Carpenter  wrote:

> On Thu, Oct 15, 2015 at 01:28:52PM +0200, Christian Gromm wrote:
> > This patch changes the data type from u32 to u16 used for temporary
> > variable. It is needed to stay in the correct range and get rid of
> > the unnecessary cast.
> > 
> > Signed-off-by: Christian Gromm 
> > ---
> >  drivers/staging/most/hdm-dim2/dim2_hdm.c |6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c 
> > b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > index 45b8332..dda02a6 100644
> > --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> > @@ -381,11 +381,11 @@ static void service_done_flag(struct dim2_hdm *dev, 
> > int ch_idx)
> > if (hdm_ch->data_type == MOST_CH_CONTROL ||
> > hdm_ch->data_type == MOST_CH_ASYNC) {
> >  
> > -   u32 const data_size =
> > -   (u32)data[0] * 256 + data[1] + 2;
> > +   u16 const data_size =
> > +   (u16)data[0] * 256 + data[1] + 2;
> 
> data is a u8 pointer.  The cast makes no sense, because integer
> promotion means it is cast to int anyway.  The const makes no sense.
> We have introduced the possibility of an integer overflow bug by
> changing the type to u16.  I don't know if that matters...

With the used protocol in mind, data_size will not exceed the range
of an u16. But you're right: when the devil cannot come, he will send.

I'll fix this up.

Thanks,
Chris

> 
> 
> regards,
> dan carpenter
> 

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


[PATCH] Staging: lustre: obd_support.h: Remove unused OBD_SLAB_FREE_RTN0

2015-10-15 Thread Shraddha Barke
Remove macro OBD_SLAB_FREE_RTN0 since it is defined but not used

Signed-off-by: Shraddha Barke 
---
 drivers/staging/lustre/lustre/include/obd_support.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/obd_support.h 
b/drivers/staging/lustre/lustre/include/obd_support.h
index ec14b72c..abc53f1 100644
--- a/drivers/staging/lustre/lustre/include/obd_support.h
+++ b/drivers/staging/lustre/lustre/include/obd_support.h
@@ -517,12 +517,6 @@ do {   
  \
 /* we memset() the slab object to 0 when allocation succeeds, so DO NOT
  * HAVE A CTOR THAT DOES ANYTHING.  its work will be cleared here.  we'd
  * love to assert on that, but slab.c keeps kmem_cache_s all to itself. */
-#define OBD_SLAB_FREE_RTN0(ptr, slab)   \
-({ \
-   kmem_cache_free((slab), (ptr)); \
-   (ptr) = NULL;\
-   0;  \
-})
 
 #define __OBD_SLAB_ALLOC_VERBOSE(ptr, slab, cptab, cpt, size, type)  \
 do { \
-- 
2.1.4

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


Re: lustre: TODO updated?

2015-10-15 Thread Drokin, Oleg
Hello!

On Oct 13, 2015, at 8:12 AM, Xose Vazquez Perez wrote:

> Is drivers/staging/lustre/TODO file updated?

Yes, it's still accurate from 10.000 ft view.

If you need some more detailed ideas, here's my current list of stuff:

 getting rid of remaining lustre allocation macros: OBD_SLAB_ALLOC/FREE and 
friends much like we got rid of
 OBD_ALLOC/FREE before.
 I think LIBCFS_ALLOC/FREE and friends would need the same treatment.

 I bet there are other wrapping functions (from libcfs compat code and such)
 that need to be removed.

 typedefs: we did remove some, there are more left that need to be taken care 
of.

 Coding style - we are much better now here and the work is ongoing by a lot of
 other people.

 Function defines - need to be looked into.

 In addition, more involved ones:

 After that there are more laborous ones like figuring out how to fit into the
 perf framework as one example.

 Also we need to rip remaining parts of server code that is still present 
greatly there
 (one example - oti handle users are either server only or client only with 
dummy
  handle - in echo code only. These could be greatly pruned.
  Then we can cleanup all the obd method tables to remove now unused pointers 
and so on).

Bye,
Oleg

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


Re: [PATCH] staging: octeon: fixed few coding style warnings

2015-10-15 Thread Dan Carpenter
Oh.  I use a script to check these...  It doesn't break anything except
for that commented out code which should be deleted anyway.

regards,
dan carpenter

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


Re: [PATCH] staging: octeon: fixed few coding style warnings

2015-10-15 Thread David Daney

On 10/15/2015 06:40 AM, Dan Carpenter wrote:

On Wed, Oct 14, 2015 at 09:09:04AM -0700, David Daney wrote:

and make sure you don't break the driver.


I'm not seeing how this patch breaks anything?  What am I missing?


Did you apply it and then compile the result?  If not, then how can you 
assert that it does not break anything?


From SubmitChecklist item #2: "Builds cleanly ..."

I don't want to waste time considering patches that don't, at a minimum, 
meet this criterion.  Other people may want to do the build testing, but 
I prefer that the patch submitter at least vet the patch enough that 
they can assert that it still builds cleanly.


David Daney

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


Re: [PATCH] staging: rtl8192u: simplify conditional statement

2015-10-15 Thread kbuild test robot
Hi Luis,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Luis-de-Bethencourt/staging-rtl8192u-simplify-conditional-statement/20151015-203425
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function 
'ieee80211_softmac_scan_syncro_rsl':
>> drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:469:19: warning: 
>> comparison of constant '5' with boolean expression is always false 
>> [-Wbool-compare]
  if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
  ^
>> drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:469:19: warning: 
>> logical not is only applied to the left hand side of comparison 
>> [-Wlogical-not-parentheses]

vim +/5 +469 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

   453   *new network events, despite for updating the net 
list,
   454   *but we are temporarly 'unlinked' as the driver 
shall
   455   *not filter RX frames and the channel is changing.
   456   * So the only situation in witch are interested is to 
check
   457   * if the state become LINKED because of the #1 
situation
   458   */
   459  
   460  if (ieee->state == IEEE80211_LINKED)
   461  goto out;
   462  ieee->set_chan(ieee->dev, ch);
   463  if(channel_map[ch] == 1)
   464  ieee80211_send_probe_requests(ieee);
   465  
   466  /* this prevent excessive time wait when we
   467   * need to wait for a syncro scan to end..
   468   */
 > 469  if(!ieee->state > IEEE80211_LINKED && 
 > ieee->sync_scan_hurryup)
   470  goto out;
   471  
   472  
   473  msleep_interruptible_rsl(IEEE80211_SOFTMAC_SCAN_TIME);
   474  
   475  }
   476  out:
   477  if(ieee->state < IEEE80211_LINKED){

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: netlogic: xlr_net.h: fixed coding style warnings

2015-10-15 Thread Sakshi Bansal
Fixed block comments usage of * on subsequent lines

Signed-off-by: Sakshi Bansal 
---
Changes in v2:
  - Made the commit message more clearer

 drivers/staging/netlogic/xlr_net.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/netlogic/xlr_net.h 
b/drivers/staging/netlogic/xlr_net.h
index 2f65ec5..7ae8874 100644
--- a/drivers/staging/netlogic/xlr_net.h
+++ b/drivers/staging/netlogic/xlr_net.h
@@ -999,7 +999,8 @@
 #define MAC_CRC_LEN 4
 #define MAX_NUM_MSGRNG_STN_CC   128
 #define MAX_MSG_SND_ATTEMPTS   100 /* 13 stns x 4 entry msg/stn +
-  headroom */
+* headroom
+*/
 
 #define MAC_FRIN_TO_BE_SENT_THRESHOLD   16
 
-- 
2.1.0

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


Re: [PATCH] staging: octeon: fixed few coding style warnings

2015-10-15 Thread Dan Carpenter
On Wed, Oct 14, 2015 at 09:09:04AM -0700, David Daney wrote:
> and make sure you don't break the driver.

I'm not seeing how this patch breaks anything?  What am I missing?

regards,
dan carpenter

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


Re: [PATCH 40/40] staging: wilc1000: fixes comparison to NULL could be written

2015-10-15 Thread Dan Carpenter
On Thu, Oct 15, 2015 at 01:25:21PM +0900, Tony Cho wrote:
> @@ -2306,7 +2303,8 @@ static void Handle_AddBeacon(struct host_if_drv 
> *hif_drv,
>   strWID.type = WID_BIN;
>   strWID.size = pstrSetBeaconParam->head_len + 
> pstrSetBeaconParam->tail_len + 16;
>   strWID.val = kmalloc(strWID.size, GFP_KERNEL);
> - if (strWID.val == NULL)
> +
> + if (!strWID.val)
>   goto ERRORHANDLER;
>  
>   pu8CurrByte = strWID.val;

This patch is fine, but an unrelated comment is that, in wilc1000 the
pattern is to put a blank line between the allocation and the error
check but that's the wrong thing.  The allocation and the check are part
of the same step and they should go next to each other.

regards,
dan carpenter

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


Re: [PATCH] staging: rtl8192u: simplify conditional statement

2015-10-15 Thread Dan Carpenter
On Thu, Oct 15, 2015 at 01:33:14PM +0100, Luis de Bethencourt wrote:
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c 
> b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> index c443e2e..1c2d1a4 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
> @@ -466,10 +466,7 @@ void ieee80211_softmac_scan_syncro(struct 
> ieee80211_device *ieee)
>   /* this prevent excessive time wait when we
>* need to wait for a syncro scan to end..
>*/
> - if(ieee->state < IEEE80211_LINKED)
> - ;
> - else
> - if (ieee->sync_scan_hurryup)
> + if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)

The precedence is wrong here.  What you wrote is equivalent to:

if ((!ieee->state) > IEEE80211_LINKED)
goto out;

Which can never be true.  Also use checkpatch.pl on your patches before
sending.

regards,
dan carpenter

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


Re: [PATCH 02/10] staging: most: fix usage of false data type

2015-10-15 Thread Dan Carpenter
On Thu, Oct 15, 2015 at 01:28:52PM +0200, Christian Gromm wrote:
> This patch changes the data type from u32 to u16 used for temporary
> variable. It is needed to stay in the correct range and get rid of
> the unnecessary cast.
> 
> Signed-off-by: Christian Gromm 
> ---
>  drivers/staging/most/hdm-dim2/dim2_hdm.c |6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c 
> b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> index 45b8332..dda02a6 100644
> --- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
> +++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
> @@ -381,11 +381,11 @@ static void service_done_flag(struct dim2_hdm *dev, int 
> ch_idx)
>   if (hdm_ch->data_type == MOST_CH_CONTROL ||
>   hdm_ch->data_type == MOST_CH_ASYNC) {
>  
> - u32 const data_size =
> - (u32)data[0] * 256 + data[1] + 2;
> + u16 const data_size =
> + (u16)data[0] * 256 + data[1] + 2;

data is a u8 pointer.  The cast makes no sense, because integer
promotion means it is cast to int anyway.  The const makes no sense.
We have introduced the possibility of an integer overflow bug by
changing the type to u16.  I don't know if that matters...


regards,
dan carpenter

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


[PATCH] staging: rtl8192u: simplify conditional statement

2015-10-15 Thread Luis de Bethencourt
The code can be much cleaner and readable by simplifying the conditional
statement.

Only need to check if (ieee->state > IEEE80211_LINKED) and not >= because
(ieee->state == IEEE80211_LINKED) is already checked a few lines above.

Signed-off-by: Luis de Bethencourt 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index c443e2e..1c2d1a4 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -466,10 +466,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device 
*ieee)
/* this prevent excessive time wait when we
 * need to wait for a syncro scan to end..
 */
-   if(ieee->state < IEEE80211_LINKED)
-   ;
-   else
-   if (ieee->sync_scan_hurryup)
+   if(!ieee->state > IEEE80211_LINKED && ieee->sync_scan_hurryup)
goto out;
 
 
-- 
2.5.1

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


[PATCH] staging: vt6655: Remove boolean comparisons

2015-10-15 Thread Luis de Bethencourt
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt 
---
 drivers/staging/vt6655/card.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index f842be6..5159270 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -472,14 +472,14 @@ bool CARDbRadioPowerOn(struct vnt_private *pDevice)
bool bResult = true;
 
pr_debug("chester power on\n");
-   if (pDevice->bRadioControlOff == true) {
-   if (pDevice->bHWRadioOff == true)
+   if (pDevice->bRadioControlOff) {
+   if (pDevice->bHWRadioOff)
pr_debug("chester bHWRadioOff\n");
-   if (pDevice->bRadioControlOff == true)
+   if (pDevice->bRadioControlOff)
pr_debug("chester bRadioControlOff\n");
return false; }
 
-   if (pDevice->bRadioOff == false) {
+   if (!pDevice->bRadioOff) {
pr_debug("chester pbRadioOff\n");
return true; }
 
-- 
2.5.1

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


Re: [PATCH] drivers:staging:gdm72xx: Fix coding style issues

2015-10-15 Thread Mike Rapoport
On Wed, Oct 14, 2015 at 09:40:37PM +0300, Janis Gengeris wrote:
> Fixes coding style warnings as reported by checkpatch.pl.

Please be more elaborate and describe what warning was fixed
 
> Signed-off-by: Janis Gengeris 
> ---
>  drivers/staging/gdm72xx/gdm_wimax.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/gdm72xx/gdm_wimax.c 
> b/drivers/staging/gdm72xx/gdm_wimax.c
> index 6e8dbaf..69f00cc 100644
> --- a/drivers/staging/gdm72xx/gdm_wimax.c
> +++ b/drivers/staging/gdm72xx/gdm_wimax.c
> @@ -581,8 +581,8 @@ static int gdm_wimax_get_prepared_info(struct net_device 
> *dev, char *buf,
>   }
>  
>   pos += gdm_wimax_hci_get_tlv(&buf[pos], &T, &L, &V);
> - if (T == TLV_T(T_MAC_ADDRESS)) {
> - if (L != dev->addr_len) {
> + if (TLV_T(T_MAC_ADDRESS) == T) {
> + if (dev->addr_len != L) {

The change is already in the Greg's staging/staging-testing tree

>   netdev_err(dev,
>  "%s Invalid information result T/L 
> [%x/%d]\n",
>  __func__, T, L);
> -- 
> 2.4.6
> 
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: staging: add Lustre file system client support

2015-10-15 Thread Dan Carpenter
On Thu, Oct 15, 2015 at 02:38:45PM +0300, Dan Carpenter wrote:
> Actually this we can't overflow here, it will return -EFAULT if param is
> NULL and paramlen is non-zero.  I'll send a patch to clean this up.

Ugh... No, I won't send a patch for this.  That LIBCFS_ALLOC() macro is
inscrutible and I am not emotionally prepared to look at it.

regards,
dan carpenter

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


Re: staging: add Lustre file system client support

2015-10-15 Thread Dan Carpenter
Actually this we can't overflow here, it will return -EFAULT if param is
NULL and paramlen is non-zero.  I'll send a patch to clean this up.

regards,
dan carpenter

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


[PATCH 10/10] staging: most: fix line-over-80-characters violations

2015-10-15 Thread Christian Gromm
This patch prevents code from crossing the 80 character margin.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-network/networking.c |3 ++-
 drivers/staging/most/hdm-dim2/dim2_hdm.h  |3 ++-
 drivers/staging/most/mostcore/core.c  |6 --
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/aim-network/networking.c 
b/drivers/staging/most/aim-network/networking.c
index 4334e51..5f0ea9b 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -349,7 +349,8 @@ static int aim_probe_channel(struct most_interface *iface, 
int channel_idx,
 
if (nd->tx.linked || nd->rx.linked) {
struct net_device *dev =
-   alloc_netdev(0, "meth%d", NET_NAME_UNKNOWN, 
most_nd_setup);
+   alloc_netdev(0, "meth%d", NET_NAME_UNKNOWN,
+most_nd_setup);
 
if (!dev) {
pr_err("no memory for net_device\n");
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.h 
b/drivers/staging/most/hdm-dim2/dim2_hdm.h
index 6e68832..1c94e33 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.h
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.h
@@ -18,7 +18,8 @@ struct device;
 
 /* platform dependent data for dim2 interface */
 struct dim2_platform_data {
-   int (*init)(struct dim2_platform_data *pd, void *io_base, int 
clk_speed);
+   int (*init)(struct dim2_platform_data *pd, void *io_base,
+   int clk_speed);
void (*destroy)(struct dim2_platform_data *pd);
void *priv;
 };
diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index ca32b21..0efc391 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -988,7 +988,8 @@ static ssize_t store_add_link(struct most_aim_obj *aim_obj,
return ret;
 
if (!mdev_devnod || *mdev_devnod == 0) {
-   snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, 
mdev_ch);
+   snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev,
+mdev_ch);
mdev_devnod = devnod_buf;
}
 
@@ -1063,7 +1064,8 @@ static ssize_t store_remove_link(struct most_aim_obj 
*aim_obj,
 }
 
 static struct most_aim_attribute most_aim_attr_remove_link =
-   __ATTR(remove_link, S_IRUGO | S_IWUSR, show_remove_link, 
store_remove_link);
+   __ATTR(remove_link, S_IRUGO | S_IWUSR, show_remove_link,
+  store_remove_link);
 
 static struct attribute *most_aim_def_attrs[] = {
&most_aim_attr_add_link.attr,
-- 
1.7.9.5

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


[PATCH 06/10] staging: most: make hdm-usb follow the coding style

2015-10-15 Thread Christian Gromm
This patch fixes a couple of issues of the hdm-usb module found by
checkpatch.pl.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-usb/hdm_usb.c |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c 
b/drivers/staging/most/hdm-usb/hdm_usb.c
index a73eb5f..0bf38c4 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -198,7 +198,8 @@ static void free_anchored_buffers(struct most_dev *mdev, 
unsigned int channel)
unsigned long flags;
 
spin_lock_irqsave(&mdev->anchor_list_lock[channel], flags);
-   list_for_each_entry_safe(anchor, tmp, &mdev->anchor_list[channel], 
list) {
+   list_for_each_entry_safe(anchor, tmp, &mdev->anchor_list[channel],
+list) {
struct urb *urb = anchor->urb;
 
spin_unlock_irqrestore(&mdev->anchor_list_lock[channel], flags);
@@ -343,7 +344,8 @@ static int hdm_add_padding(struct most_dev *mdev, int 
channel, struct mbo *mbo)
  * This takes the INIC hardware specific padding bytes off a streaming
  * channel's buffer.
  */
-static int hdm_remove_padding(struct most_dev *mdev, int channel, struct mbo 
*mbo)
+static int hdm_remove_padding(struct most_dev *mdev, int channel,
+ struct mbo *mbo)
 {
unsigned int j, num_frames, frame_size;
struct most_channel_config *const conf = &mdev->conf[channel];
@@ -619,7 +621,8 @@ static void hdm_read_completion(struct urb *urb)
  *
  * Context: Could in _some_ cases be interrupt!
  */
-static int hdm_enqueue(struct most_interface *iface, int channel, struct mbo 
*mbo)
+static int hdm_enqueue(struct most_interface *iface, int channel,
+  struct mbo *mbo)
 {
struct most_dev *mdev;
struct buf_anchor *anchor;
@@ -767,8 +770,7 @@ static int hdm_configure_channel(struct most_interface 
*iface, int channel,
tmp_val = conf->buffer_size / frame_size;
conf->buffer_size = tmp_val * frame_size;
dev_notice(dev,
-  "Channel %d - rounding buffer size to %d bytes, "
-  "channel config says %d bytes\n",
+  "Channel %d - rounding buffer size to %d bytes, 
channel config says %d bytes\n",
   channel,
   conf->buffer_size,
   temp_size);
@@ -891,7 +893,7 @@ static void wq_netinfo(struct work_struct *wq_obj)
for (i = 0; i < 6; i++)
prev_hw_addr[i] = mdev->hw_addr[i];
 
-   if (0 > hdm_update_netinfo(mdev))
+   if (hdm_update_netinfo(mdev) < 0)
return;
if ((prev_link_stat != mdev->link_stat) ||
(prev_hw_addr[0] != mdev->hw_addr[0]) ||
-- 
1.7.9.5

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


[PATCH 00/10] staging: most: fix checkpatch issues

2015-10-15 Thread Christian Gromm
This patchset is needed to remove warnings generated by checkpatch.

Christian Gromm (9):
  staging: most: correct coding style breaches
  staging: most: fix usage of false data type
  staging: most: remove constants from comparisons
  staging: most: fix checkpatch issues of hdm i2c
  staging: most: make hdm-usb follow the coding style
  staging: most: fix misplaced constants in comparisons
  staging: most: replace memcpy by ether_addr_copy
  staging: most: change parameter description
  staging: most: fix line-over-80-characters violations

Gavin Thomas Claugus (1):
  staging: most: fix style issue in aim-cdev/cdev.c

 drivers/staging/most/aim-cdev/cdev.c  |7 ---
 drivers/staging/most/aim-network/networking.c |7 ---
 drivers/staging/most/hdm-dim2/dim2_hal.c  |   21 +++-
 drivers/staging/most/hdm-dim2/dim2_hdm.c  |   26 -
 drivers/staging/most/hdm-dim2/dim2_hdm.h  |3 ++-
 drivers/staging/most/hdm-dim2/dim2_sysfs.c|3 ++-
 drivers/staging/most/hdm-i2c/hdm_i2c.c|9 +
 drivers/staging/most/hdm-usb/hdm_usb.c|   14 +++--
 drivers/staging/most/mostcore/core.c  |   10 ++
 drivers/staging/most/mostcore/mostcore.h  |2 +-
 10 files changed, 57 insertions(+), 45 deletions(-)

-- 
1.7.9.5

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


[PATCH 09/10] staging: most: change parameter description

2015-10-15 Thread Christian Gromm
This patch changes the description of a function parameter for a better
understanding.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/mostcore.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/mostcore/mostcore.h 
b/drivers/staging/most/mostcore/mostcore.h
index 9bd4c77..e148b32 100644
--- a/drivers/staging/most/mostcore/mostcore.h
+++ b/drivers/staging/most/mostcore/mostcore.h
@@ -255,7 +255,7 @@ struct most_interface {
  * struct most_aim - identifies MOST device driver to mostcore
  * @name: Driver name
  * @probe_channel: function for core to notify driver about channel connection
- * @disconnect_channel: notification that a certain channel isn't available 
anymore
+ * @disconnect_channel: callback function to disconnect a certain channel
  * @rx_completion: completion handler for received packets
  * @tx_completion: completion handler for transmitted packets
  * @context: context pointer to be used by mostcore
-- 
1.7.9.5

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


[PATCH 05/10] staging: most: fix checkpatch issues of hdm i2c

2015-10-15 Thread Christian Gromm
This patch fixes the issues of HDM module i2c found by checkpatch.pl

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-i2c/hdm_i2c.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/hdm-i2c/hdm_i2c.c 
b/drivers/staging/most/hdm-i2c/hdm_i2c.c
index 9768281..2cce1e5 100644
--- a/drivers/staging/most/hdm-i2c/hdm_i2c.c
+++ b/drivers/staging/most/hdm-i2c/hdm_i2c.c
@@ -96,7 +96,7 @@ static int configure_channel(struct most_interface 
*most_iface,
if (channel_config->direction == MOST_CH_RX) {
if (dev->polling_mode)
schedule_delayed_work(&dev->rx.dwork,
- msecs_to_jiffies(MSEC_PER_SEC / 
4));
+   msecs_to_jiffies(MSEC_PER_SEC / 4));
}
dev->is_open[ch_idx] = true;
 
@@ -222,7 +222,8 @@ static void do_rx_work(struct hdm_i2c *dev)
 
for (;;) {
/* Conditions to wait for: poisoned channel or free buffer
-  available for reading  */
+* available for reading
+*/
if (wait_event_interruptible(dev->rx.waitq,
 !dev->is_open[ch_idx] ||
 !list_empty(&dev->rx.list))) {
@@ -367,8 +368,8 @@ static int i2c_probe(struct i2c_client *client, const 
struct i2c_device_id *id)
ret = request_irq(client->irq, most_irq_handler, 0,
  client->name, dev);
if (ret) {
-   pr_info("IRQ request failed: %d, "
-   "falling back to polling\n", ret);
+   pr_info("IRQ request failed: %d, falling back to 
polling\n",
+   ret);
dev->polling_mode = true;
}
}
-- 
1.7.9.5

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


[PATCH 04/10] staging: most: remove constants from comparisons

2015-10-15 Thread Christian Gromm
This patch removes constants from comparisons and fixes checkpatch warnings
about constants being put in the wrong place inside a comparison.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-cdev/cdev.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c 
b/drivers/staging/most/aim-cdev/cdev.c
index 16be88e..93b07661 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -134,7 +134,7 @@ static int aim_close(struct inode *inode, struct file *filp)
}
mutex_unlock(&channel->io_mutex);
 
-   while (0 != kfifo_out((struct kfifo *)&channel->fifo, &mbo, 1))
+   while (kfifo_out((struct kfifo *)&channel->fifo, &mbo, 1))
most_put_mbo(mbo);
if (channel->keep_mbo)
most_put_mbo(channel->stacked_mbo);
@@ -233,7 +233,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, 
loff_t *offset)
channel->keep_mbo = false;
goto start_copy;
}
-   while ((0 == kfifo_out(&channel->fifo, &mbo, 1))
+   while ((!kfifo_out(&channel->fifo, &mbo, 1))
   && (channel->dev)) {
if (filp->f_flags & O_NONBLOCK)
return -EAGAIN;
-- 
1.7.9.5

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


[PATCH 07/10] staging: most: fix misplaced constants in comparisons

2015-10-15 Thread Christian Gromm
This patch removes and fixes constants being misplaced in comparisons.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/mostcore/core.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/mostcore/core.c 
b/drivers/staging/most/mostcore/core.c
index 1905547..ca32b21 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -938,7 +938,7 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch)
break;
}
}
-   if (unlikely(2 > found))
+   if (unlikely(found < 2))
return ERR_PTR(-EIO);
return c;
 }
@@ -1561,7 +1561,7 @@ int most_start_channel(struct most_interface *iface, int 
id,
else
num_buffer = arm_mbo_chain(c, c->cfg.direction,
   most_write_completion);
-   if (unlikely(0 == num_buffer)) {
+   if (unlikely(!num_buffer)) {
pr_info("failed to allocate memory\n");
ret = -ENOMEM;
goto error;
-- 
1.7.9.5

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


[PATCH 08/10] staging: most: replace memcpy by ether_addr_copy

2015-10-15 Thread Christian Gromm
This patch replaces memcpy() by the preferred function ether_addr_copy().

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-network/networking.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/most/aim-network/networking.c 
b/drivers/staging/most/aim-network/networking.c
index f0d9a43..4334e51 100644
--- a/drivers/staging/most/aim-network/networking.c
+++ b/drivers/staging/most/aim-network/networking.c
@@ -467,7 +467,7 @@ static int aim_rx_data(struct mbo *mbo)
 
if (nd->is_mamac) {
/* dest */
-   memcpy(skb_put(skb, ETH_ALEN), dev->dev_addr, ETH_ALEN);
+   ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr);
 
/* src */
memcpy(skb_put(skb, 4), &zero, 4);
@@ -554,7 +554,7 @@ void most_deliver_netinfo(struct most_interface *iface,
return;
 
if (mac_addr)
-   memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
+   ether_addr_copy(dev->dev_addr, mac_addr);
 
if (nd->link_stat != link_stat) {
nd->link_stat = link_stat;
-- 
1.7.9.5

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


[PATCH 02/10] staging: most: fix usage of false data type

2015-10-15 Thread Christian Gromm
This patch changes the data type from u32 to u16 used for temporary
variable. It is needed to stay in the correct range and get rid of
the unnecessary cast.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-dim2/dim2_hdm.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c 
b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index 45b8332..dda02a6 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -381,11 +381,11 @@ static void service_done_flag(struct dim2_hdm *dev, int 
ch_idx)
if (hdm_ch->data_type == MOST_CH_CONTROL ||
hdm_ch->data_type == MOST_CH_ASYNC) {
 
-   u32 const data_size =
-   (u32)data[0] * 256 + data[1] + 2;
+   u16 const data_size =
+   (u16)data[0] * 256 + data[1] + 2;
 
mbo->processed_length =
-   min(data_size, (u32)mbo->buffer_length);
+   min(data_size, mbo->buffer_length);
} else {
mbo->processed_length = mbo->buffer_length;
}
-- 
1.7.9.5

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


[PATCH 01/10] staging: most: correct coding style breaches

2015-10-15 Thread Christian Gromm
This patch fixes line-over-80-characters violation and removes the
splitting of quoted strings.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/hdm-dim2/dim2_hal.c   |   21 -
 drivers/staging/most/hdm-dim2/dim2_hdm.c   |   20 ++--
 drivers/staging/most/hdm-dim2/dim2_sysfs.c |3 ++-
 3 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c 
b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 0e54830..81dd8de 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hal.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hal.c
@@ -134,7 +134,7 @@ static int alloc_dbr(u16 size)
return block_idx * DBR_BLOCK_SIZE;
}
block_idx += mask_size;
-   /* do shift left with 2 steps for case mask_size == 32 
*/
+   /* do shift left with 2 steps in case mask_size == 32 */
mask <<= mask_size - 1;
} while ((mask <<= 1) != 0);
}
@@ -639,7 +639,8 @@ static bool channel_start(struct dim_channel *ch, u32 
buf_addr, u16 buf_size)
if (ch->packet_length || ch->bytes_per_frame)
dim2_start_isoc_sync(ch->addr, state->idx1, buf_addr, buf_size);
else
-   dim2_start_ctrl_async(ch->addr, state->idx1, buf_addr, 
buf_size);
+   dim2_start_ctrl_async(ch->addr, state->idx1, buf_addr,
+ buf_size);
state->idx1 ^= 1;
 
return true;
@@ -855,11 +856,11 @@ void DIM_ServiceIrq(struct dim_channel *const *channels)
}
 
/*
-* Use while-loop and a flag to make sure the age is changed back at 
least once,
-* otherwise the interrupt may never come if CPU generates interrupt on 
changing age.
-*
-* This cycle runs not more than number of channels, because 
service_interrupts
-* routine doesn't start the channel again.
+* Use while-loop and a flag to make sure the age is changed back at
+* least once, otherwise the interrupt may never come if CPU generates
+* interrupt on changing age.
+* This cycle runs not more than number of channels, because
+* channel_service_interrupt() routine doesn't start the channel again.
 */
do {
struct dim_channel *const *ch = channels;
@@ -900,7 +901,8 @@ struct dim_ch_state_t *DIM_GetChannelState(struct 
dim_channel *ch,
 bool DIM_EnqueueBuffer(struct dim_channel *ch, u32 buffer_addr, u16 
buffer_size)
 {
if (!ch)
-   return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED, "Bad 
channel");
+   return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED,
+   "Bad channel");
 
return channel_start(ch, buffer_addr, buffer_size);
 }
@@ -908,7 +910,8 @@ bool DIM_EnqueueBuffer(struct dim_channel *ch, u32 
buffer_addr, u16 buffer_size)
 bool DIM_DetachBuffers(struct dim_channel *ch, u16 buffers_number)
 {
if (!ch)
-   return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED, "Bad 
channel");
+   return dim_on_error(DIM_ERR_DRIVER_NOT_INITIALIZED,
+   "Bad channel");
 
return channel_detach_buffers(ch, buffers_number);
 }
diff --git a/drivers/staging/most/hdm-dim2/dim2_hdm.c 
b/drivers/staging/most/hdm-dim2/dim2_hdm.c
index c7e956f..45b8332 100644
--- a/drivers/staging/most/hdm-dim2/dim2_hdm.c
+++ b/drivers/staging/most/hdm-dim2/dim2_hdm.c
@@ -200,8 +200,7 @@ static int startup_dim(struct platform_device *pdev)
}
 
if (dev->clk_speed == -1) {
-   pr_info("Bad or missing clock speed parameter,"
-   " using default value: 3072fs\n");
+   pr_info("Bad or missing clock speed parameter, using default 
value: 3072fs\n");
dev->clk_speed = CLK_3072FS;
} else
pr_info("Selected clock speed: %s\n", clock_speed);
@@ -359,8 +358,7 @@ static void service_done_flag(struct dim2_hdm *dev, int 
ch_idx)
spin_lock_irqsave(&dim_lock, flags);
if (list_empty(head)) {
spin_unlock_irqrestore(&dim_lock, flags);
-   pr_crit("hard error: started_mbo list is empty "
-   "whereas DIM2 has sent buffers\n");
+   pr_crit("hard error: started_mbo list is empty whereas 
DIM2 has sent buffers\n");
break;
}
 
@@ -547,7 +545,8 @@ static int configure_channel(struct most_interface 
*most_iface, int ch_idx,
pr_warn("%s: fixed buffer size (%d -> %d)\n",
hdm_ch->name, buf_size, new_size);
spin_lock_irqsave(&dim_lock, flags);
-   hal_ret = DIM_InitControl(&hdm_ch->ch, is_tx, ch_addr, 
buf_size);
+   hal_ret = DIM_InitControl(&h

[PATCH 03/10] staging: most: fix style issue in aim-cdev/cdev.c

2015-10-15 Thread Christian Gromm
From: Gavin Thomas Claugus 

Fix 80+ character line in cdev.c to stop checkpatch.pl from raising a
warning.

Signed-off-by: Gavin Thomas Claugus 
Signed-off-by: Christian Gromm 
---
 drivers/staging/most/aim-cdev/cdev.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/most/aim-cdev/cdev.c 
b/drivers/staging/most/aim-cdev/cdev.c
index 930ada0..16be88e 100644
--- a/drivers/staging/most/aim-cdev/cdev.c
+++ b/drivers/staging/most/aim-cdev/cdev.c
@@ -99,7 +99,8 @@ static int aim_open(struct inode *inode, struct file *filp)
return -EBUSY;
}
 
-   ret = most_start_channel(channel->iface, channel->channel_id, 
&cdev_aim);
+   ret = most_start_channel(channel->iface, channel->channel_id,
+   &cdev_aim);
if (ret)
atomic_dec(&channel->access_ref);
return ret;
-- 
1.7.9.5

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


re: staging: add Lustre file system client support

2015-10-15 Thread Dan Carpenter
Hello Lustre Devs,

The patch d7e09d0397e8: "staging: add Lustre file system client
support" from May 2, 2013, leads to the following static checker
warning:

drivers/staging/lustre/lnet/selftest/console.c:1330 lstcon_test_add()
error: 'paramlen' from user is not capped properly

drivers/staging/lustre/lnet/selftest/console.c
  1273  int
  1274  lstcon_test_add(char *batch_name, int type, int loop,
  1275  int concur, int dist, int span,
  1276  char *src_name, char *dst_name,
  1277  void *param, int paramlen, int *retp,
  1278  struct list_head *result_up)
  1279  {
  1280  lstcon_test_t*test   = NULL;
  1281  int  rc;
  1282  lstcon_group_t   *src_grp = NULL;
  1283  lstcon_group_t   *dst_grp = NULL;
  1284  lstcon_batch_t   *batch = NULL;
  1285  
  1286  /*
  1287   * verify that a batch of the given name exists, and the groups
  1288   * that will be part of the batch exist and have at least one
  1289   * active node
  1290   */
  1291  rc = lstcon_verify_batch(batch_name, &batch);
  1292  if (rc != 0)
  1293  goto out;
  1294  
  1295  rc = lstcon_verify_group(src_name, &src_grp);
  1296  if (rc != 0)
  1297  goto out;
  1298  
  1299  rc = lstcon_verify_group(dst_name, &dst_grp);
  1300  if (rc != 0)
  1301  goto out;
  1302  
  1303  if (dst_grp->grp_userland)
  1304  *retp = 1;
  1305  
  1306  LIBCFS_ALLOC(test, offsetof(lstcon_test_t, 
tes_param[paramlen]));

There is an underflow and integer overflow bug here.

  1307  if (!test) {
  1308  CERROR("Can't allocate test descriptor\n");
  1309  rc = -ENOMEM;
  1310  
  1311  goto out;
  1312  }
  1313  
  1314  test->tes_hdr.tsb_id= batch->bat_hdr.tsb_id;
  1315  test->tes_batch = batch;
  1316  test->tes_type  = type;
  1317  test->tes_oneside   = 0; /* TODO */
  1318  test->tes_loop  = loop;
  1319  test->tes_concur= concur;
  1320  test->tes_stop_onerr= 1; /* TODO */
  1321  test->tes_span  = span;
  1322  test->tes_dist  = dist;
  1323  test->tes_cliidx= 0; /* just used for creating RPC */
  1324  test->tes_src_grp   = src_grp;
  1325  test->tes_dst_grp   = dst_grp;
  1326  INIT_LIST_HEAD(&test->tes_trans_list);
  1327  
  1328  if (param != NULL) {
  1329  test->tes_paramlen = paramlen;
  1330  memcpy(&test->tes_param[0], param, paramlen);
   

This is the warning.

  1331  }

The warning here is a false positive because the caller validates
"paramlen" when "param" is non-NULL.  Unfortunately, on line 1306, we
use "paramlen" even when param is NULL.  "paramlen" is signed so this
can mean "test" is smaller than expected leading to memory corruption.

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


re: staging: add Lustre file system client support

2015-10-15 Thread Dan Carpenter
Hello Lustre Devs,

The patch d7e09d0397e8: "staging: add Lustre file system client
support" from May 2, 2013, leads to the following static checker
warning:

drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c:150 
libcfs_kkuc_group_rem()
error: buffer overflow 'kkuc_groups' 3 <= s32max

drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c
   146  int libcfs_kkuc_group_rem(int uid, int group)
   147  {
   148  struct kkuc_reg *reg, *next;
   149  
   150  if (kkuc_groups[group].next == NULL)

group doesn't appear to have been validated at all.  It comes from the
user.  The call tree is:

-> lmv_iocontrol()
   -> lmv_hsm_ct_unregister()
  -> libcfs_kkuc_group_rem()

It looks like this code could oops.

   151  return 0;
   152  
   153  if (uid == 0) {
   154  /* Broadcast a shutdown message */
   155  struct kuc_hdr lh;
   156  
   157  lh.kuc_magic = KUC_MAGIC;
   158  lh.kuc_transport = KUC_TRANSPORT_GENERIC;
   159  lh.kuc_msgtype = KUC_MSG_SHUTDOWN;
   160  lh.kuc_msglen = sizeof(lh);
   161  libcfs_kkuc_group_put(group, &lh);
   162  }
   163  
   164  down_write(&kg_sem);
   165  list_for_each_entry_safe(reg, next, &kkuc_groups[group], 
kr_chain) {
   166  if ((uid == 0) || (uid == reg->kr_uid)) {
   167  list_del(®->kr_chain);
   168  CDEBUG(D_KUC, "Removed uid=%d fp=%p from group 
%d\n",
   169 reg->kr_uid, reg->kr_fp, group);
   170  if (reg->kr_fp != NULL)
   171  fput(reg->kr_fp);
   172  kfree(reg);
   173  }
   174  }
   175  up_write(&kg_sem);
   176  
   177  return 0;
   178  }

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


Re: [PATCH] staging: netlogic: xlr_net.h: fixedcoding stly warnings

2015-10-15 Thread Mike Rapoport
On Wed, Oct 14, 2015 at 07:29:30PM +0530, Sakshi Bansal wrote:
> Fixed block comments usage of * on subsequent lines
> 
> Signed-off-by: Sakshi Bansal 
> ---
>  drivers/staging/netlogic/xlr_net.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Please fix the patch subject. There's a space missing in "fixed coding"
and "stly" should have been "style"
 
> diff --git a/drivers/staging/netlogic/xlr_net.h 
> b/drivers/staging/netlogic/xlr_net.h
> index 2f65ec5..7ae8874 100644
> --- a/drivers/staging/netlogic/xlr_net.h
> +++ b/drivers/staging/netlogic/xlr_net.h
> @@ -999,7 +999,8 @@
>  #define MAC_CRC_LEN 4
>  #define MAX_NUM_MSGRNG_STN_CC   128
>  #define MAX_MSG_SND_ATTEMPTS 100 /* 13 stns x 4 entry msg/stn +
> -headroom */
> +  * headroom
> +  */
>  
>  #define MAC_FRIN_TO_BE_SENT_THRESHOLD   16
>  
> -- 
> 2.1.0
> 
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: nvec: fixed few coding style warnings

2015-10-15 Thread Marc Dietrich
Am Donnerstag, 15. Oktober 2015, 11:48:12 schrieb Dan Carpenter:
> On Thu, Oct 15, 2015 at 10:39:02AM +0200, Marc Dietrich wrote:
> > > > -   if (unlikely(nvec->rx == NULL)) {
> > > > +   if (!unlikely(nvec->rx)) {
> > > 
> > > This isn't right.  You intented to say:
> > >   if (unlikely(!nvec->rx)) {
> > > 
> > > But even better to just remove the unlikely entirely.
> > > 
> > >   if (!nvec->rx) {
> > 
> > why? the "unlikely" is there to optimize a critical interrupt path.
> 
> The rule is that drivers should not use likely/unlikely() unless there
> is a difference in benchmark numbers. 

well, we know that additional cpu cycles in this path break transfer for 
unknown reasons. However, the unlikely here may be overkill. On the other 
hand, I prefer not to change something here until these timing effects are 
better understood.

> How critical can it be when it's
> always followed by a udelay(100)???

yes, this delay shouldn't be there at all. This is one of the timing mysteries 
we still have to resolve.

> There are more important optimizations needed here.

sure. We are currently trying to move all this out into the tegra-i2c driver, 
so this code block will get a major review/rewrite in the near future anyway.

Marc


signature.asc
Description: This is a digitally signed message part.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: nvec: fixed few coding style warnings

2015-10-15 Thread Dan Carpenter
On Thu, Oct 15, 2015 at 10:39:02AM +0200, Marc Dietrich wrote:
> > > - if (unlikely(nvec->rx == NULL)) {
> > > + if (!unlikely(nvec->rx)) {
> > 
> > This isn't right.  You intented to say:
> > 
> > if (unlikely(!nvec->rx)) {
> > 
> > But even better to just remove the unlikely entirely.
> > 
> > if (!nvec->rx) {
> 
> why? the "unlikely" is there to optimize a critical interrupt path.

The rule is that drivers should not use likely/unlikely() unless there
is a difference in benchmark numbers.  How critical can it be when it's
always followed by a udelay(100)???

There are more important optimizations needed here.

regards,
dan carpenter

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


Re: [PATCH] staging: nvec: fixed few coding style warnings

2015-10-15 Thread Marc Dietrich
Am Mittwoch, 14. Oktober 2015, 21:12:36 schrieb Dan Carpenter:
> On Wed, Oct 14, 2015 at 07:38:22PM +0530, Sakshi Bansal wrote:
> > Fixed allignmnet issues and block comments usage
> 
> Split it apart by type of fix.
> 
> > @@ -617,7 +618,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
> > 
> > } else {
> > 
> > nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX);
> > /* Should not happen in a normal world */
> > 
> > -   if (unlikely(nvec->rx == NULL)) {
> > +   if (!unlikely(nvec->rx)) {
> 
> This isn't right.  You intented to say:
> 
>   if (unlikely(!nvec->rx)) {
> 
> But even better to just remove the unlikely entirely.
> 
>   if (!nvec->rx) {

why? the "unlikely" is there to optimize a critical interrupt path.


Marc


signature.asc
Description: This is a digitally signed message part.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH] staging: wilc1000: join_req_drv can be static

2015-10-15 Thread kbuild test robot

Signed-off-by: Fengguang Wu 
---
 host_interface.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 704419f..ca6f3983 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -267,7 +267,7 @@ u8 mode_11i;
 u8 auth_type;
 u32 join_req_size;
 u32 info_element_size;
-struct host_if_drv *join_req_drv;
+static struct host_if_drv *join_req_drv;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
 #define FLUSHED_BYTE_POS 79
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 34/40] staging: wilc1000: rename variable gu8FlushedJoinReqDrvHandler

2015-10-15 Thread kbuild test robot
Hi Leo,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Tony-Cho/staging-wilc1000-rename-ssidLen-of-struct-join_bss_param/20151015-123159
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wilc1000/host_interface.c:239:20: sparse: symbol 
'terminated_handle' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:241:4: sparse: symbol 
'P2P_LISTEN_STATE' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol 
'hif_sema_driver' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol 
'hif_sema_deinit' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol 
'periodic_rssi' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol 
'scan_while_connected' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol 'join_req' 
was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol 'mode_11i' 
was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol 
'join_req_size' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol 
'info_element_size' was not declared. Should it be static?
>> drivers/staging/wilc1000/host_interface.c:270:20: sparse: symbol 
>> 'join_req_drv' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:407:5: sparse: symbol 
'Handle_set_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:442:5: sparse: symbol 
'Handle_get_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2212:5: sparse: symbol 
'Handle_GetStatistics' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2352:38: sparse: incompatible 
types for operation (>)
   drivers/staging/wilc1000/host_interface.c:2352:38:left side has type 
unsigned char [usertype] *tail
   drivers/staging/wilc1000/host_interface.c:2352:38:right side has type int

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 33/40] staging: wilc1000: rename variable gu32FlushedInfoElemAsocSize

2015-10-15 Thread kbuild test robot
Hi Leo,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Tony-Cho/staging-wilc1000-rename-ssidLen-of-struct-join_bss_param/20151015-123159
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wilc1000/host_interface.c:239:20: sparse: symbol 
'terminated_handle' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:241:4: sparse: symbol 
'P2P_LISTEN_STATE' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol 
'hif_sema_driver' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol 
'hif_sema_deinit' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol 
'periodic_rssi' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol 
'scan_while_connected' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol 'join_req' 
was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol 'mode_11i' 
was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol 
'join_req_size' was not declared. Should it be static?
>> drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol 
>> 'info_element_size' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:407:5: sparse: symbol 
'Handle_set_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:442:5: sparse: symbol 
'Handle_get_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2212:5: sparse: symbol 
'Handle_GetStatistics' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2352:38: sparse: incompatible 
types for operation (>)
   drivers/staging/wilc1000/host_interface.c:2352:38:left side has type 
unsigned char [usertype] *tail
   drivers/staging/wilc1000/host_interface.c:2352:38:right side has type int

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH] staging: wilc1000: info_element_size can be static

2015-10-15 Thread kbuild test robot

Signed-off-by: Fengguang Wu 
---
 host_interface.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 961e853..965fffb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -266,7 +266,7 @@ u8 *info_element;
 u8 mode_11i;
 u8 auth_type;
 u32 join_req_size;
-u32 info_element_size;
+static u32 info_element_size;
 struct host_if_drv *gu8FlushedJoinReqDrvHandler;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 32/40] staging: wilc1000: rename variable gu32FlushedJoinReqSize

2015-10-15 Thread kbuild test robot
Hi Leo,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Tony-Cho/staging-wilc1000-rename-ssidLen-of-struct-join_bss_param/20151015-123159
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wilc1000/host_interface.c:239:20: sparse: symbol 
'terminated_handle' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:241:4: sparse: symbol 
'P2P_LISTEN_STATE' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol 
'hif_sema_driver' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol 
'hif_sema_deinit' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol 
'periodic_rssi' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol 
'scan_while_connected' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol 'join_req' 
was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol 'mode_11i' 
was not declared. Should it be static?
>> drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol 
>> 'join_req_size' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol 
'gu32FlushedInfoElemAsocSize' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:407:5: sparse: symbol 
'Handle_set_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:442:5: sparse: symbol 
'Handle_get_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2213:5: sparse: symbol 
'Handle_GetStatistics' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2353:38: sparse: incompatible 
types for operation (>)
   drivers/staging/wilc1000/host_interface.c:2353:38:left side has type 
unsigned char [usertype] *tail
   drivers/staging/wilc1000/host_interface.c:2353:38:right side has type int

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 30/40] staging: wilc1000: rename variable gu8Flushed11iMode

2015-10-15 Thread kbuild test robot
Hi Leo,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Tony-Cho/staging-wilc1000-rename-ssidLen-of-struct-join_bss_param/20151015-123159
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wilc1000/host_interface.c:239:20: sparse: symbol 
'terminated_handle' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:241:4: sparse: symbol 
'P2P_LISTEN_STATE' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol 
'hif_sema_driver' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol 
'hif_sema_deinit' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol 
'periodic_rssi' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol 
'scan_while_connected' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol 'join_req' 
was not declared. Should it be static?
>> drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol 'mode_11i' 
>> was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:267:4: sparse: symbol 
'gu8FlushedAuthType' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol 
'gu32FlushedJoinReqSize' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol 
'gu32FlushedInfoElemAsocSize' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:407:5: sparse: symbol 
'Handle_set_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:442:5: sparse: symbol 
'Handle_get_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2213:5: sparse: symbol 
'Handle_GetStatistics' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2353:38: sparse: incompatible 
types for operation (>)
   drivers/staging/wilc1000/host_interface.c:2353:38:left side has type 
unsigned char [usertype] *tail
   drivers/staging/wilc1000/host_interface.c:2353:38:right side has type int

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH] staging: wilc1000: mode_11i can be static

2015-10-15 Thread kbuild test robot

Signed-off-by: Fengguang Wu 
---
 host_interface.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 778d9b3..3b86b97 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -263,7 +263,7 @@ static u8 del_beacon;
 
 u8 *join_req;
 u8 *info_element;
-u8 mode_11i;
+static u8 mode_11i;
 u8 gu8FlushedAuthType;
 u32 gu32FlushedJoinReqSize;
 u32 gu32FlushedInfoElemAsocSize;
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC PATCH] staging: wilc1000: join_req can be static

2015-10-15 Thread kbuild test robot

Signed-off-by: Fengguang Wu 
---
 host_interface.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 38ce396..a9b17fc0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -261,7 +261,7 @@ static u8 get_ip[2][4];
 static u32 inactive_time;
 static u8 del_beacon;
 
-u8 *join_req;
+static u8 *join_req;
 u8 *gu8FlushedInfoElemAsoc;
 u8 gu8Flushed11iMode;
 u8 gu8FlushedAuthType;
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 28/40] staging: wilc1000: rename variable gu8FlushedJoinReq

2015-10-15 Thread kbuild test robot
Hi Leo,

[auto build test WARNING on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Tony-Cho/staging-wilc1000-rename-ssidLen-of-struct-join_bss_param/20151015-123159
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/staging/wilc1000/host_interface.c:239:20: sparse: symbol 
'terminated_handle' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:241:4: sparse: symbol 
'P2P_LISTEN_STATE' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:245:18: sparse: symbol 
'hif_sema_driver' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:247:18: sparse: symbol 
'hif_sema_deinit' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:248:19: sparse: symbol 
'periodic_rssi' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:254:6: sparse: symbol 
'scan_while_connected' was not declared. Should it be static?
>> drivers/staging/wilc1000/host_interface.c:264:4: sparse: symbol 'join_req' 
>> was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:265:4: sparse: symbol 
'gu8FlushedInfoElemAsoc' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:266:4: sparse: symbol 
'gu8Flushed11iMode' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:267:4: sparse: symbol 
'gu8FlushedAuthType' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:268:5: sparse: symbol 
'gu32FlushedJoinReqSize' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:269:5: sparse: symbol 
'gu32FlushedInfoElemAsocSize' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:407:5: sparse: symbol 
'Handle_set_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:442:5: sparse: symbol 
'Handle_get_IPAddress' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2210:5: sparse: symbol 
'Handle_GetStatistics' was not declared. Should it be static?
   drivers/staging/wilc1000/host_interface.c:2350:38: sparse: incompatible 
types for operation (>)
   drivers/staging/wilc1000/host_interface.c:2350:38:left side has type 
unsigned char [usertype] *tail
   drivers/staging/wilc1000/host_interface.c:2350:38:right side has type int

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel