All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast
@ 2015-10-13 11:02 Tony Cho
  2015-10-13 11:02 ` [PATCH 47/54] staging: wilc1000: rename u32count " Tony Cho
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames bIsEnabled of struct set_multicast to enabled to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 42f59fa..7ea9e01 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -140,7 +140,7 @@ struct beacon_attr {
 };
 
 struct set_multicast {
-	bool bIsEnabled;
+	bool enabled;
 	u32 u32count;
 };
 
@@ -2796,10 +2796,10 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv,
 		goto ERRORHANDLER;
 
 	pu8CurrByte = strWID.val;
-	*pu8CurrByte++ = (strHostIfSetMulti->bIsEnabled & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->bIsEnabled >> 8) & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->bIsEnabled >> 16) & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->bIsEnabled >> 24) & 0xFF);
+	*pu8CurrByte++ = (strHostIfSetMulti->enabled & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 8) & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 16) & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 24) & 0xFF);
 
 	*pu8CurrByte++ = (strHostIfSetMulti->u32count & 0xFF);
 	*pu8CurrByte++ = ((strHostIfSetMulti->u32count >> 8) & 0xFF);
@@ -4912,7 +4912,7 @@ s32 host_int_setup_multicast_filter(struct host_if_drv *hif_drv,
 	msg.id = HOST_IF_MSG_SET_MULTICAST_FILTER;
 	msg.drv = hif_drv;
 
-	pstrMulticastFilterParam->bIsEnabled = bIsEnabled;
+	pstrMulticastFilterParam->enabled = bIsEnabled;
 	pstrMulticastFilterParam->u32count = u32count;
 
 	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 47/54] staging: wilc1000: rename u32count of struct set_multicast
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 48/54] staging: wilc1000: rename au8MacAddr of struct del_sta Tony Cho
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames u32count of struct set_multicast to cnt to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 7ea9e01..9cd42f7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -141,7 +141,7 @@ struct beacon_attr {
 
 struct set_multicast {
 	bool enabled;
-	u32 u32count;
+	u32 cnt;
 };
 
 struct del_all_sta {
@@ -2790,7 +2790,7 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv,
 
 	strWID.id = (u16)WID_SETUP_MULTICAST_FILTER;
 	strWID.type = WID_BIN;
-	strWID.size = sizeof(struct set_multicast) + ((strHostIfSetMulti->u32count) * ETH_ALEN);
+	strWID.size = sizeof(struct set_multicast) + ((strHostIfSetMulti->cnt) * ETH_ALEN);
 	strWID.val = kmalloc(strWID.size, GFP_KERNEL);
 	if (strWID.val == NULL)
 		goto ERRORHANDLER;
@@ -2801,13 +2801,13 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv,
 	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 16) & 0xFF);
 	*pu8CurrByte++ = ((strHostIfSetMulti->enabled >> 24) & 0xFF);
 
-	*pu8CurrByte++ = (strHostIfSetMulti->u32count & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->u32count >> 8) & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->u32count >> 16) & 0xFF);
-	*pu8CurrByte++ = ((strHostIfSetMulti->u32count >> 24) & 0xFF);
+	*pu8CurrByte++ = (strHostIfSetMulti->cnt & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 8) & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 16) & 0xFF);
+	*pu8CurrByte++ = ((strHostIfSetMulti->cnt >> 24) & 0xFF);
 
-	if ((strHostIfSetMulti->u32count) > 0)
-		memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->u32count) * ETH_ALEN));
+	if ((strHostIfSetMulti->cnt) > 0)
+		memcpy(pu8CurrByte, gau8MulticastMacAddrList, ((strHostIfSetMulti->cnt) * ETH_ALEN));
 
 	s32Error = send_config_pkt(SET_CFG, &strWID, 1,
 				   get_id_from_handler(hif_drv));
@@ -4913,7 +4913,7 @@ s32 host_int_setup_multicast_filter(struct host_if_drv *hif_drv,
 	msg.drv = hif_drv;
 
 	pstrMulticastFilterParam->enabled = bIsEnabled;
-	pstrMulticastFilterParam->u32count = u32count;
+	pstrMulticastFilterParam->cnt = u32count;
 
 	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (s32Error)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 48/54] staging: wilc1000: rename au8MacAddr of struct del_sta
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
  2015-10-13 11:02 ` [PATCH 47/54] staging: wilc1000: rename u32count " Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 49/54] staging: wilc1000: rename bIsEnabled of struct power_mgmt_param Tony Cho
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames au8MacAddr of struct del_sta to mac_addr to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 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 9cd42f7..4f7ebdc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -150,7 +150,7 @@ struct del_all_sta {
 };
 
 struct del_sta {
-	u8 au8MacAddr[ETH_ALEN];
+	u8 mac_addr[ETH_ALEN];
 };
 
 struct power_mgmt_param {
@@ -2544,7 +2544,7 @@ static void Handle_DelStation(struct host_if_drv *hif_drv,
 
 	pu8CurrByte = strWID.val;
 
-	memcpy(pu8CurrByte, pstrDelStaParam->au8MacAddr, ETH_ALEN);
+	memcpy(pu8CurrByte, pstrDelStaParam->mac_addr, ETH_ALEN);
 
 	s32Error = send_config_pkt(SET_CFG, &strWID, 1,
 				   get_id_from_handler(hif_drv));
@@ -4758,9 +4758,9 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, const u8 *pu8MacAddr)
 	msg.drv = hif_drv;
 
 	if (pu8MacAddr == NULL)
-		memset(pstrDelStationMsg->au8MacAddr, 255, ETH_ALEN);
+		memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
 	else
-		memcpy(pstrDelStationMsg->au8MacAddr, pu8MacAddr, ETH_ALEN);
+		memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 
 	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (s32Error)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 49/54] staging: wilc1000: rename bIsEnabled of struct power_mgmt_param
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
  2015-10-13 11:02 ` [PATCH 47/54] staging: wilc1000: rename u32count " Tony Cho
  2015-10-13 11:02 ` [PATCH 48/54] staging: wilc1000: rename au8MacAddr of struct del_sta Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 50/54] staging: wilc1000: rename u32Timeout " Tony Cho
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames bIsEnabled of struct power_mgmt_param to enabled to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 4f7ebdc..0c44fd0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -154,8 +154,7 @@ struct del_sta {
 };
 
 struct power_mgmt_param {
-
-	bool bIsEnabled;
+	bool enabled;
 	u32 u32Timeout;
 };
 
@@ -2763,7 +2762,7 @@ static void Handle_PowerManagement(struct host_if_drv *hif_drv,
 
 	strWID.id = (u16)WID_POWER_MANAGEMENT;
 
-	if (strPowerMgmtParam->bIsEnabled == true)
+	if (strPowerMgmtParam->enabled == true)
 		s8PowerMode = MIN_FAST_PS;
 	else
 		s8PowerMode = NO_POWERSAVE;
@@ -4881,7 +4880,7 @@ s32 host_int_set_power_mgmt(struct host_if_drv *hif_drv,
 	msg.id = HOST_IF_MSG_POWER_MGMT;
 	msg.drv = hif_drv;
 
-	pstrPowerMgmtParam->bIsEnabled = bIsEnabled;
+	pstrPowerMgmtParam->enabled = bIsEnabled;
 	pstrPowerMgmtParam->u32Timeout = u32Timeout;
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 50/54] staging: wilc1000: rename u32Timeout of struct power_mgmt_param
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
                   ` (2 preceding siblings ...)
  2015-10-13 11:02 ` [PATCH 49/54] staging: wilc1000: rename bIsEnabled of struct power_mgmt_param Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 51/54] staging: wilc1000: rename au8IPAddr of struct set_ip_addr Tony Cho
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames u32Timeout of struct power_mgmt_param to timeout to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0c44fd0..97d1bd8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -155,7 +155,7 @@ struct del_sta {
 
 struct power_mgmt_param {
 	bool enabled;
-	u32 u32Timeout;
+	u32 timeout;
 };
 
 struct set_ip_addr {
@@ -4881,8 +4881,7 @@ s32 host_int_set_power_mgmt(struct host_if_drv *hif_drv,
 	msg.drv = hif_drv;
 
 	pstrPowerMgmtParam->enabled = bIsEnabled;
-	pstrPowerMgmtParam->u32Timeout = u32Timeout;
-
+	pstrPowerMgmtParam->timeout = u32Timeout;
 
 	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (s32Error)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 51/54] staging: wilc1000: rename au8IPAddr of struct set_ip_addr
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
                   ` (3 preceding siblings ...)
  2015-10-13 11:02 ` [PATCH 50/54] staging: wilc1000: rename u32Timeout " Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 52/54] staging: wilc1000: rename pu8Buffer of struct rcvd_net_info Tony Cho
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames au8IPAddr of struct set_ip_addr to ip_addr to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 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 97d1bd8..8fb6ef5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -159,7 +159,7 @@ struct power_mgmt_param {
 };
 
 struct set_ip_addr {
-	u8 *au8IPAddr;
+	u8 *ip_addr;
 	u8 idx;
 };
 
@@ -3079,12 +3079,12 @@ static int hostIFthread(void *pvArg)
 
 		case HOST_IF_MSG_SET_IPADDRESS:
 			PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
-			Handle_set_IPAddress(msg.drv, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
+			Handle_set_IPAddress(msg.drv, msg.body.ip_info.ip_addr, msg.body.ip_info.idx);
 			break;
 
 		case HOST_IF_MSG_GET_IPADDRESS:
 			PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
-			Handle_get_IPAddress(msg.drv, msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
+			Handle_get_IPAddress(msg.drv, msg.body.ip_info.ip_addr, msg.body.ip_info.idx);
 			break;
 
 		case HOST_IF_MSG_SET_MAC_ADDRESS:
@@ -5162,7 +5162,7 @@ s32 host_int_setup_ipaddress(struct host_if_drv *hif_drv, u8 *u16ipadd, u8 idx)
 
 	msg.id = HOST_IF_MSG_SET_IPADDRESS;
 
-	msg.body.ip_info.au8IPAddr = u16ipadd;
+	msg.body.ip_info.ip_addr = u16ipadd;
 	msg.drv = hif_drv;
 	msg.body.ip_info.idx = idx;
 
@@ -5189,7 +5189,7 @@ s32 host_int_get_ipaddress(struct host_if_drv *hif_drv, u8 *u16ipadd, u8 idx)
 
 	msg.id = HOST_IF_MSG_GET_IPADDRESS;
 
-	msg.body.ip_info.au8IPAddr = u16ipadd;
+	msg.body.ip_info.ip_addr = u16ipadd;
 	msg.drv = hif_drv;
 	msg.body.ip_info.idx = idx;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 52/54] staging: wilc1000: rename pu8Buffer of struct rcvd_net_info
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
                   ` (4 preceding siblings ...)
  2015-10-13 11:02 ` [PATCH 51/54] staging: wilc1000: rename au8IPAddr of struct set_ip_addr Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 53/54] staging: wilc1000: rename u32Length " Tony Cho
  2015-10-13 11:02 ` [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER Tony Cho
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames pu8Buffer of struct rcvd_net_info to buffer to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 13 ++++++-------
 drivers/staging/wilc1000/host_interface.h |  2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 8fb6ef5..432b275 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1450,7 +1450,7 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
 
 	if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) {
 		PRINT_D(HOSTINF_DBG, "State: Scanning, parsing network information received\n");
-		parse_network_info(pstrRcvdNetworkInfo->pu8Buffer, &pstrNetworkInfo);
+		parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo);
 		if ((pstrNetworkInfo == NULL)
 		    || (hif_drv->strWILC_UsrScanReq.pfUserScanResult == NULL)) {
 			PRINT_ER("driver is null\n");
@@ -1509,9 +1509,9 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
 	}
 
 done:
-	if (pstrRcvdNetworkInfo->pu8Buffer != NULL) {
-		kfree(pstrRcvdNetworkInfo->pu8Buffer);
-		pstrRcvdNetworkInfo->pu8Buffer = NULL;
+	if (pstrRcvdNetworkInfo->buffer != NULL) {
+		kfree(pstrRcvdNetworkInfo->buffer);
+		pstrRcvdNetworkInfo->buffer = NULL;
 	}
 
 	if (pstrNetworkInfo != NULL) {
@@ -4440,9 +4440,8 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
 	msg.drv = hif_drv;
 
 	msg.body.net_info.u32Length = u32Length;
-	msg.body.net_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL);
-	memcpy(msg.body.net_info.pu8Buffer,
-		    pu8Buffer, u32Length);
+	msg.body.net_info.buffer = kmalloc(u32Length, GFP_KERNEL);
+	memcpy(msg.body.net_info.buffer, pu8Buffer, u32Length);
 
 	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (s32Error)
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 0c5f395..778dbf5 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -199,7 +199,7 @@ typedef void (*wilc_remain_on_chan_ready)(void *); /*Remain on channel callback
  *  @version		1.0
  */
 struct rcvd_net_info {
-	u8 *pu8Buffer;
+	u8 *buffer;
 	u32 u32Length;
 };
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 53/54] staging: wilc1000: rename u32Length of struct rcvd_net_info
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
                   ` (5 preceding siblings ...)
  2015-10-13 11:02 ` [PATCH 52/54] staging: wilc1000: rename pu8Buffer of struct rcvd_net_info Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 11:02 ` [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER Tony Cho
  7 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch renames u32Length of struct rcvd_net_info to len to
avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 432b275..392bf08 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4439,7 +4439,7 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
 	msg.id = HOST_IF_MSG_RCVD_NTWRK_INFO;
 	msg.drv = hif_drv;
 
-	msg.body.net_info.u32Length = u32Length;
+	msg.body.net_info.len = u32Length;
 	msg.body.net_info.buffer = kmalloc(u32Length, GFP_KERNEL);
 	memcpy(msg.body.net_info.buffer, pu8Buffer, u32Length);
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 778dbf5..146a60f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -200,7 +200,7 @@ typedef void (*wilc_remain_on_chan_ready)(void *); /*Remain on channel callback
  */
 struct rcvd_net_info {
 	u8 *buffer;
-	u32 u32Length;
+	u32 len;
 };
 
 struct hidden_net_info {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER
  2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
                   ` (6 preceding siblings ...)
  2015-10-13 11:02 ` [PATCH 53/54] staging: wilc1000: rename u32Length " Tony Cho
@ 2015-10-13 11:02 ` Tony Cho
  2015-10-13 14:08   ` Mike Rapoport
  7 siblings, 1 reply; 11+ messages in thread
From: Tony Cho @ 2015-10-13 11:02 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Leo Kim <leo.kim@atmel.com>

This patch removes goto ERRORHANDER and the result variable in wilc_mq_send.
Then, the error type is directly returned. If normal operation, freeing memory
is not needed in this function.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index b13809a..60539aa 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -56,20 +56,17 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
 int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 			     const void *pvSendBuffer, u32 u32SendBufferSize)
 {
-	int result = 0;
 	unsigned long flags;
 	Message *pstrMessage = NULL;
 
 	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
 		PRINT_ER("pHandle or pvSendBuffer is null\n");
-		result = -EFAULT;
-		goto ERRORHANDLER;
+		return -EFAULT;
 	}
 
 	if (pHandle->bExiting) {
 		PRINT_ER("pHandle fail\n");
-		result = -EFAULT;
-		goto ERRORHANDLER;
+		return -EFAULT;
 	}
 
 	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
@@ -83,8 +80,8 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 	pstrMessage->pvBuffer = kmemdup(pvSendBuffer, u32SendBufferSize,
 					GFP_ATOMIC);
 	if (!pstrMessage->pvBuffer) {
-		result = -ENOMEM;
-		goto ERRORHANDLER;
+		kfree(pstrMessage);
+		return -ENOMEM;
 	}
 
 	/* add it to the message queue */
@@ -103,14 +100,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 
 	up(&pHandle->hSem);
 
-ERRORHANDLER:
-	/* error occured, free any allocations */
-	if (pstrMessage) {
-		kfree(pstrMessage->pvBuffer);
-		kfree(pstrMessage);
-	}
-
-	return result;
+	return 0;
 }
 
 /*!
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER
  2015-10-13 11:02 ` [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER Tony Cho
@ 2015-10-13 14:08   ` Mike Rapoport
  2015-10-14  5:26     ` Tony Cho
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Rapoport @ 2015-10-13 14:08 UTC (permalink / raw)
  To: Tony Cho
  Cc: gregkh, devel, rachel.kim, chris.park, austin.shin,
	linux-wireless, johnny.kim, Nicolas.FERRE, adel.noureldin,
	leo.kim, adham.abozaeid

On Tue, Oct 13, 2015 at 08:02:12PM +0900, Tony Cho wrote:
> From: Leo Kim <leo.kim@atmel.com>
> 
> This patch removes goto ERRORHANDER and the result variable in wilc_mq_send.
> Then, the error type is directly returned. If normal operation, freeing memory
> is not needed in this function.
> 
> Signed-off-by: Leo Kim <leo.kim@atmel.com>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>  drivers/staging/wilc1000/wilc_msgqueue.c | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
> index b13809a..60539aa 100644
> --- a/drivers/staging/wilc1000/wilc_msgqueue.c
> +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
> @@ -56,20 +56,17 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
>  int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>  			     const void *pvSendBuffer, u32 u32SendBufferSize)
>  {
> -	int result = 0;
>  	unsigned long flags;
>  	Message *pstrMessage = NULL;
>  
>  	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
>  		PRINT_ER("pHandle or pvSendBuffer is null\n");
> -		result = -EFAULT;
> -		goto ERRORHANDLER;
> +		return -EFAULT;
>  	}
>  
>  	if (pHandle->bExiting) {
>  		PRINT_ER("pHandle fail\n");
> -		result = -EFAULT;
> -		goto ERRORHANDLER;
> +		return -EFAULT;
>  	}
>  
>  	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
> @@ -83,8 +80,8 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>  	pstrMessage->pvBuffer = kmemdup(pvSendBuffer, u32SendBufferSize,
>  					GFP_ATOMIC);
>  	if (!pstrMessage->pvBuffer) {
> -		result = -ENOMEM;
> -		goto ERRORHANDLER;
> +		kfree(pstrMessage);
> +		return -ENOMEM;

It seems that the error path returns from the function while still
holding spinlock and semaphore. It would be better to rework allocation
errors handling so that the locks will be released, rather than just
remove goto...

>  	}
>  
>  	/* add it to the message queue */
> @@ -103,14 +100,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>  
>  	up(&pHandle->hSem);
>  
> -ERRORHANDLER:
> -	/* error occured, free any allocations */
> -	if (pstrMessage) {
> -		kfree(pstrMessage->pvBuffer);
> -		kfree(pstrMessage);
> -	}
> -
> -	return result;
> +	return 0;
>  }
>  
>  /*!
> -- 
> 1.9.1
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER
  2015-10-13 14:08   ` Mike Rapoport
@ 2015-10-14  5:26     ` Tony Cho
  0 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-10-14  5:26 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: gregkh, devel, rachel.kim, chris.park, austin.shin,
	linux-wireless, johnny.kim, Nicolas.FERRE, adel.noureldin,
	leo.kim, adham.abozaeid



On 2015년 10월 13일 23:08, Mike Rapoport wrote:
> On Tue, Oct 13, 2015 at 08:02:12PM +0900, Tony Cho wrote:
>> From: Leo Kim <leo.kim@atmel.com>
>>
>> This patch removes goto ERRORHANDER and the result variable in wilc_mq_send.
>> Then, the error type is directly returned. If normal operation, freeing memory
>> is not needed in this function.
>>
>> Signed-off-by: Leo Kim <leo.kim@atmel.com>
>> Signed-off-by: Tony Cho <tony.cho@atmel.com>
>> ---
>>   drivers/staging/wilc1000/wilc_msgqueue.c | 20 +++++---------------
>>   1 file changed, 5 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
>> index b13809a..60539aa 100644
>> --- a/drivers/staging/wilc1000/wilc_msgqueue.c
>> +++ b/drivers/staging/wilc1000/wilc_msgqueue.c
>> @@ -56,20 +56,17 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)
>>   int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>>   			     const void *pvSendBuffer, u32 u32SendBufferSize)
>>   {
>> -	int result = 0;
>>   	unsigned long flags;
>>   	Message *pstrMessage = NULL;
>>   
>>   	if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
>>   		PRINT_ER("pHandle or pvSendBuffer is null\n");
>> -		result = -EFAULT;
>> -		goto ERRORHANDLER;
>> +		return -EFAULT;
>>   	}
>>   
>>   	if (pHandle->bExiting) {
>>   		PRINT_ER("pHandle fail\n");
>> -		result = -EFAULT;
>> -		goto ERRORHANDLER;
>> +		return -EFAULT;
>>   	}
>>   
>>   	spin_lock_irqsave(&pHandle->strCriticalSection, flags);
>> @@ -83,8 +80,8 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>>   	pstrMessage->pvBuffer = kmemdup(pvSendBuffer, u32SendBufferSize,
>>   					GFP_ATOMIC);
>>   	if (!pstrMessage->pvBuffer) {
>> -		result = -ENOMEM;
>> -		goto ERRORHANDLER;
>> +		kfree(pstrMessage);
>> +		return -ENOMEM;
> It seems that the error path returns from the function while still
> holding spinlock and semaphore. It would be better to rework allocation
> errors handling so that the locks will be released, rather than just
> remove goto...

Thanks for your review. I am going to send v2 for it.

Tony.

>>   	}
>>   
>>   	/* add it to the message queue */
>> @@ -103,14 +100,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
>>   
>>   	up(&pHandle->hSem);
>>   
>> -ERRORHANDLER:
>> -	/* error occured, free any allocations */
>> -	if (pstrMessage) {
>> -		kfree(pstrMessage->pvBuffer);
>> -		kfree(pstrMessage);
>> -	}
>> -
>> -	return result;
>> +	return 0;
>>   }
>>   
>>   /*!
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> devel mailing list
>> devel@linuxdriverproject.org
>> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-14  5:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 11:02 [PATCH 46/54] staging: wilc1000: rename bIsEnabled of struct set_multicast Tony Cho
2015-10-13 11:02 ` [PATCH 47/54] staging: wilc1000: rename u32count " Tony Cho
2015-10-13 11:02 ` [PATCH 48/54] staging: wilc1000: rename au8MacAddr of struct del_sta Tony Cho
2015-10-13 11:02 ` [PATCH 49/54] staging: wilc1000: rename bIsEnabled of struct power_mgmt_param Tony Cho
2015-10-13 11:02 ` [PATCH 50/54] staging: wilc1000: rename u32Timeout " Tony Cho
2015-10-13 11:02 ` [PATCH 51/54] staging: wilc1000: rename au8IPAddr of struct set_ip_addr Tony Cho
2015-10-13 11:02 ` [PATCH 52/54] staging: wilc1000: rename pu8Buffer of struct rcvd_net_info Tony Cho
2015-10-13 11:02 ` [PATCH 53/54] staging: wilc1000: rename u32Length " Tony Cho
2015-10-13 11:02 ` [PATCH 54/54] staging: wilc1000: wilc_msgqueue.c : remove the goto ERRORHANDER Tony Cho
2015-10-13 14:08   ` Mike Rapoport
2015-10-14  5:26     ` Tony Cho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.