Skip to contentSkip to conversation

staging: wilc1000: renames multiple camel-cased parameters in wilc methods

PATCH New Tahia Khan 1 participant 4 messages Mar 8, 2017 Staging

lore
Share & tools
lore

Tahia Khan

author
#0 lore raw

v2 cover staging: wilc1000: renames multiple camel-cased parameters in wilc methods

Multiple camel-cased parameters renamed in wilc RX buffer manipulation methods. Originally reported by checkpatch.pl.

Changes since v1: Removing unnecessary linebreak, as
reported by Greg KH <[email protected]>

Tahia Khan (3):
staging: wilc1000: Fixes camel-casing in wilc_scan_complete_received
staging: wilc1000: Fixes camel-casing in wilc_network_info_received
staging: wilc1000: Fixes camel-casing in wilc_gnrl_info_received

 drivers/staging/wilc1000/coreconfigurator.h |  9 +++------
 drivers/staging/wilc1000/host_interface.c   | 27 ++++++++++++---------------
 2 files changed, 15 insertions(+), 21 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH v2 1/3 staging: wilc1000: Fixes camel-casing in wilc_scan_complete_received

Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_scan_complete_received.

---
 drivers/staging/wilc1000/coreconfigurator.h | 3 +--
 drivers/staging/wilc1000/host_interface.c   | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +1 -2
index 10101f8..f40d458 100644
@@ -124,8 +124,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
 			    struct network_info **ret_network_info);
 s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
 			       struct connect_resp_info **ret_connect_resp_info);
-void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
-				 u32 u32Length);
+void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length);
 void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
 				u32 u32Length);
 void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
drivers/staging/wilc1000/host_interface.c +2 -3
index f848bb8..3eec9dc 100644
@@ -3523,8 +3523,7 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	mutex_unlock(&hif_deinit_lock);
 }
 
-void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
-				 u32 u32Length)
+void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length)
 {
 	s32 result = 0;
 	struct host_if_msg msg;
@@ -3532,7 +3531,7 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
 	struct host_if_drv *hif_drv = NULL;
 	struct wilc_vif *vif;
 
-	id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
+	id = ((buffer[length - 4]) | (buffer[length - 3] << 8) | (buffer[length - 2] << 16) | (buffer[length - 1] << 24));
 	vif = wilc_get_vif_from_idx(wilc, id);
 	if (!vif)
 		return;
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH v2 2/3 staging: wilc1000: Fixes camel-casing in wilc_network_info_received

In reply to Tahia Khan

Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_network_info_received.

---
 drivers/staging/wilc1000/coreconfigurator.h |  3 +--
 drivers/staging/wilc1000/host_interface.c   | 11 +++++------
 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +1 -2
index f40d458..45dce5b 100644
@@ -125,8 +125,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
 s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
 			       struct connect_resp_info **ret_connect_resp_info);
 void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length);
-void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
-				u32 u32Length);
+void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length);
 void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 				   u32 u32Length);
 #endif
drivers/staging/wilc1000/host_interface.c +5 -6
index 3eec9dc..ca1990f 100644
@@ -3442,8 +3442,7 @@ int wilc_deinit(struct wilc_vif *vif)
 	return result;
 }
 
-void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
-				u32 u32Length)
+void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length)
 {
 	s32 result = 0;
 	struct host_if_msg msg;
@@ -3451,7 +3450,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	struct host_if_drv *hif_drv = NULL;
 	struct wilc_vif *vif;
 
-	id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
+	id = ((buffer[length - 4]) | (buffer[length - 3] << 8) | (buffer[length - 2] << 16) | (buffer[length - 1] << 24));
 	vif = wilc_get_vif_from_idx(wilc, id);
 	if (!vif)
 		return;
@@ -3467,9 +3466,9 @@ void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	msg.id = HOST_IF_MSG_RCVD_NTWRK_INFO;
 	msg.vif = vif;
 
-	msg.body.net_info.len = u32Length;
-	msg.body.net_info.buffer = kmalloc(u32Length, GFP_KERNEL);
-	memcpy(msg.body.net_info.buffer, pu8Buffer, u32Length);
+	msg.body.net_info.len = length;
+	msg.body.net_info.buffer = kmalloc(length, GFP_KERNEL);
+	memcpy(msg.body.net_info.buffer, buffer, length);
 
 	result = wilc_enqueue_cmd(&msg);
 	if (result)
Signature · 1 line
2.7.4
author
#3 lore raw

PATCH v2 3/3 staging: wilc1000: Fixes camel-casing in wilc_gnrl_info_received

In reply to Tahia Khan

Fixes checkpatch warning by renaming pu8Buffer to buffer and u32Length to length in wilc_gnrl_info_received.

---
 drivers/staging/wilc1000/coreconfigurator.h |  3 +--
 drivers/staging/wilc1000/host_interface.c   | 11 +++++------
 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +1 -2
index 45dce5b..5256f40 100644
@@ -126,6 +126,5 @@ s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
 			       struct connect_resp_info **ret_connect_resp_info);
 void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length);
 void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length);
-void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
-				   u32 u32Length);
+void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *buffer, u32 length);
 #endif
drivers/staging/wilc1000/host_interface.c +5 -6
index ca1990f..6aef2b5 100644
@@ -3475,8 +3475,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length)
 		netdev_err(vif->ndev, "message parameters (%d)\n", result);
 }
 
-void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
-				   u32 u32Length)
+void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *buffer, u32 length)
 {
 	s32 result = 0;
 	struct host_if_msg msg;
@@ -3486,7 +3485,7 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 
 	mutex_lock(&hif_deinit_lock);
 
-	id = ((pu8Buffer[u32Length - 4]) | (pu8Buffer[u32Length - 3] << 8) | (pu8Buffer[u32Length - 2] << 16) | (pu8Buffer[u32Length - 1] << 24));
+	id = ((buffer[length - 4]) | (buffer[length - 3] << 8) | (buffer[length - 2] << 16) | (buffer[length - 1] << 24));
 	vif = wilc_get_vif_from_idx(wilc, id);
 	if (!vif) {
 		mutex_unlock(&hif_deinit_lock);
@@ -3511,9 +3510,9 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	msg.id = HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO;
 	msg.vif = vif;
 
-	msg.body.async_info.len = u32Length;
-	msg.body.async_info.buffer = kmalloc(u32Length, GFP_KERNEL);
-	memcpy(msg.body.async_info.buffer, pu8Buffer, u32Length);
+	msg.body.async_info.len = length;
+	msg.body.async_info.buffer = kmalloc(length, GFP_KERNEL);
+	memcpy(msg.body.async_info.buffer, buffer, length);
 
 	result = wilc_enqueue_cmd(&msg);
 	if (result)
Signature · 1 line
2.7.4