diff mbox

[38/80] staging: wilc1000: rename au8Bssid of struct ba_session_info

Message ID 1446015640-29398-38-git-send-email-glen.lee@atmel.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Glen Lee Oct. 28, 2015, 6:59 a.m. UTC
From: Leo Kim <leo.kim@atmel.com>

This patch renames au8Bssid of struct ba_session_info to bssid
to avoid CamelCase naming convention.
And, some debug logs modified because 80 ending line over warnings.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 32 ++++++++++++++++++-------------
 drivers/staging/wilc1000/host_interface.h |  2 +-
 2 files changed, 20 insertions(+), 14 deletions(-)

Comments

Dan Carpenter Oct. 28, 2015, 4:56 p.m. UTC | #1
On Wed, Oct 28, 2015 at 03:59:58PM +0900, Glen Lee wrote:
> From: Leo Kim <leo.kim@atmel.com>
> 
> This patch renames au8Bssid of struct ba_session_info to bssid
> to avoid CamelCase naming convention.
> And, some debug logs modified because 80 ending line over warnings.
> 
> Signed-off-by: Leo Kim <leo.kim@atmel.com>
> Signed-off-by: Glen Lee <glen.lee@atmel.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 32 ++++++++++++++++++-------------
>  drivers/staging/wilc1000/host_interface.h |  2 +-
>  2 files changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 9ad98fd..48a232f 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2715,10 +2715,14 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
>  	int AddbaTimeout = 100;
>  	char *ptr = NULL;
>  
> -	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
> -		strHostIfBASessionInfo->au8Bssid[0],
> -		strHostIfBASessionInfo->au8Bssid[1],
> -		strHostIfBASessionInfo->au8Bssid[2],
> +	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with \
> +		\nBSSID = %.2x:%.2x:%.2x \
> +		\nBufferSize == %d \
> +		\nSessionTimeOut = %d \
> +		\nTID=%d\n",
> +		strHostIfBASessionInfo->bssid[0],
> +		strHostIfBASessionInfo->bssid[1],
> +		strHostIfBASessionInfo->bssid[2],
>  		strHostIfBASessionInfo->u16BufferSize,
>  		strHostIfBASessionInfo->u16SessionTimeout,
>  		strHostIfBASessionInfo->u8Ted);

This should be a bunch of printks so that we have the correct debug
level at the start of each line.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Joe Perches Oct. 28, 2015, 5:06 p.m. UTC | #2
On Wed, 2015-10-28 at 19:56 +0300, Dan Carpenter wrote:
> On Wed, Oct 28, 2015 at 03:59:58PM +0900, Glen Lee wrote:
> > From: Leo Kim <leo.kim@atmel.com>
> > 
> > This patch renames au8Bssid of struct ba_session_info to bssid
> > to avoid CamelCase naming convention.
> > And, some debug logs modified because 80 ending line over warnings.

Don't worry about some 80 column warnings.

> > diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
[]
> > @@ -2715,10 +2715,14 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
> >  	int AddbaTimeout = 100;
> >  	char *ptr = NULL;
> >  
> > -	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
> > -		strHostIfBASessionInfo->au8Bssid[0],
> > -		strHostIfBASessionInfo->au8Bssid[1],
> > -		strHostIfBASessionInfo->au8Bssid[2],
> > +	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with \
> > +		\nBSSID = %.2x:%.2x:%.2x \
> > +		\nBufferSize == %d \
> > +		\nSessionTimeOut = %d \
> > +		\nTID=%d\n",
> > +		strHostIfBASessionInfo->bssid[0],
> > +		strHostIfBASessionInfo->bssid[1],
> > +		strHostIfBASessionInfo->bssid[2],
> >  		strHostIfBASessionInfo->u16BufferSize,
> >  		strHostIfBASessionInfo->u16SessionTimeout,
> >  		strHostIfBASessionInfo->u8Ted);
> 
> This should be a bunch of printks so that we have the correct debug
> level at the start of each line.

Also, don't use continuation \
as this adds undesired whitespace for each new line

Realistically, this should just be a single line output.

	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with BSSID = %02x:%02x:%02x TID=%d BufferSize == %d SessionTimeOut = %d\n",
		etc...

But why are only 3 bytes of the bssid desired/emitted?


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Glen Lee Oct. 29, 2015, 2:02 a.m. UTC | #3
On 2015? 10? 29? 01:56, Dan Carpenter wrote:
> On Wed, Oct 28, 2015 at 03:59:58PM +0900, Glen Lee wrote:
>> From: Leo Kim <leo.kim@atmel.com>
>>
>> This patch renames au8Bssid of struct ba_session_info to bssid
>> to avoid CamelCase naming convention.
>> And, some debug logs modified because 80 ending line over warnings.
>>
>> Signed-off-by: Leo Kim <leo.kim@atmel.com>
>> Signed-off-by: Glen Lee <glen.lee@atmel.com>
>> ---
>>   drivers/staging/wilc1000/host_interface.c | 32 ++++++++++++++++++-------------
>>   drivers/staging/wilc1000/host_interface.h |  2 +-
>>   2 files changed, 20 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
>> index 9ad98fd..48a232f 100644
>> --- a/drivers/staging/wilc1000/host_interface.c
>> +++ b/drivers/staging/wilc1000/host_interface.c
>> @@ -2715,10 +2715,14 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
>>   	int AddbaTimeout = 100;
>>   	char *ptr = NULL;
>>   
>> -	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
>> -		strHostIfBASessionInfo->au8Bssid[0],
>> -		strHostIfBASessionInfo->au8Bssid[1],
>> -		strHostIfBASessionInfo->au8Bssid[2],
>> +	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with \
>> +		\nBSSID = %.2x:%.2x:%.2x \
>> +		\nBufferSize == %d \
>> +		\nSessionTimeOut = %d \
>> +		\nTID=%d\n",
>> +		strHostIfBASessionInfo->bssid[0],
>> +		strHostIfBASessionInfo->bssid[1],
>> +		strHostIfBASessionInfo->bssid[2],
>>   		strHostIfBASessionInfo->u16BufferSize,
>>   		strHostIfBASessionInfo->u16SessionTimeout,
>>   		strHostIfBASessionInfo->u8Ted);
> This should be a bunch of printks so that we have the correct debug
> level at the start of each line.

Thank you for your advice.
We will use netdev_xxx print format later with a bunch of prints when the function gets access net_device.
For now, continuation \ will be deleted and will be like,

	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with BSSID = %02x:%02x:%02x TID=%d BufferSize == %d SessionTimeOut = %d\n",
		etc...

> regards,
> dan carpenter
>

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

Patch

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 9ad98fd..48a232f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2715,10 +2715,14 @@  static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
 	int AddbaTimeout = 100;
 	char *ptr = NULL;
 
-	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\nBufferSize == %d\nSessionTimeOut = %d\n",
-		strHostIfBASessionInfo->au8Bssid[0],
-		strHostIfBASessionInfo->au8Bssid[1],
-		strHostIfBASessionInfo->au8Bssid[2],
+	PRINT_D(HOSTINF_DBG, "Opening Block Ack session with \
+		\nBSSID = %.2x:%.2x:%.2x \
+		\nBufferSize == %d \
+		\nSessionTimeOut = %d \
+		\nTID=%d\n",
+		strHostIfBASessionInfo->bssid[0],
+		strHostIfBASessionInfo->bssid[1],
+		strHostIfBASessionInfo->bssid[2],
 		strHostIfBASessionInfo->u16BufferSize,
 		strHostIfBASessionInfo->u16SessionTimeout,
 		strHostIfBASessionInfo->u8Ted);
@@ -2731,7 +2735,7 @@  static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
 	*ptr++ = 0x14;
 	*ptr++ = 0x3;
 	*ptr++ = 0x0;
-	memcpy(ptr, strHostIfBASessionInfo->au8Bssid, ETH_ALEN);
+	memcpy(ptr, strHostIfBASessionInfo->bssid, ETH_ALEN);
 	ptr += ETH_ALEN;
 	*ptr++ = strHostIfBASessionInfo->u8Ted;
 	*ptr++ = 1;
@@ -2756,7 +2760,7 @@  static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
 	*ptr++ = 15;
 	*ptr++ = 7;
 	*ptr++ = 0x2;
-	memcpy(ptr, strHostIfBASessionInfo->au8Bssid, ETH_ALEN);
+	memcpy(ptr, strHostIfBASessionInfo->bssid, ETH_ALEN);
 	ptr += ETH_ALEN;
 	*ptr++ = strHostIfBASessionInfo->u8Ted;
 	*ptr++ = 8;
@@ -2778,10 +2782,12 @@  static s32 Handle_DelAllRxBASessions(struct host_if_drv *hif_drv,
 	struct wid wid;
 	char *ptr = NULL;
 
-	PRINT_D(GENERIC_DBG, "Delete Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\n",
-		strHostIfBASessionInfo->au8Bssid[0],
-		strHostIfBASessionInfo->au8Bssid[1],
-		strHostIfBASessionInfo->au8Bssid[2],
+	PRINT_D(GENERIC_DBG, "Delete Block Ack session with \
+		\nBSSID = %.2x:%.2x:%.2x \
+		\nTID=%d\n",
+		strHostIfBASessionInfo->bssid[0],
+		strHostIfBASessionInfo->bssid[1],
+		strHostIfBASessionInfo->bssid[2],
 		strHostIfBASessionInfo->u8Ted);
 
 	wid.id = (u16)WID_DEL_ALL_RX_BA;
@@ -2792,7 +2798,7 @@  static s32 Handle_DelAllRxBASessions(struct host_if_drv *hif_drv,
 	*ptr++ = 0x14;
 	*ptr++ = 0x3;
 	*ptr++ = 0x2;
-	memcpy(ptr, strHostIfBASessionInfo->au8Bssid, ETH_ALEN);
+	memcpy(ptr, strHostIfBASessionInfo->bssid, ETH_ALEN);
 	ptr += ETH_ALEN;
 	*ptr++ = strHostIfBASessionInfo->u8Ted;
 	*ptr++ = 0;
@@ -4911,7 +4917,7 @@  s32 host_int_delBASession(struct host_if_drv *hif_drv, char *pBSSID, char TID)
 
 	msg.id = HOST_IF_MSG_DEL_BA_SESSION;
 
-	memcpy(pBASessionInfo->au8Bssid, pBSSID, ETH_ALEN);
+	memcpy(pBASessionInfo->bssid, pBSSID, ETH_ALEN);
 	pBASessionInfo->u8Ted = TID;
 	msg.drv = hif_drv;
 
@@ -4941,7 +4947,7 @@  s32 host_int_del_All_Rx_BASession(struct host_if_drv *hif_drv,
 
 	msg.id = HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS;
 
-	memcpy(pBASessionInfo->au8Bssid, pBSSID, ETH_ALEN);
+	memcpy(pBASessionInfo->bssid, pBSSID, ETH_ALEN);
 	pBASessionInfo->u8Ted = TID;
 	msg.drv = hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 230c95a..0b6220e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -229,7 +229,7 @@  struct get_mac_addr {
 };
 
 struct ba_session_info {
-	u8 au8Bssid[ETH_ALEN];
+	u8 bssid[ETH_ALEN];
 	u8 u8Ted;
 	u16 u16BufferSize;
 	u16 u16SessionTimeout;