All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h
@ 2018-07-25 22:16 John Whitmore
  2018-07-25 22:16 ` [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

This series of patches contain purely simple coding style changes.

I considered renaming the struct cmpk_set_cfg_t as it is never actually
used. Following its definition however it is used in a #define:

#define		cmpk_query_cfg_t	cmpk_set_cfg_t

So whilst the struct cmpk_set_cfg_t is never used, cmpk_query_cfg_t is.
I left it because the comments described this.

I was also tempted to remove comments at the end of lines pushing the
lines over 80 character length. The comments are at the end of sizeof
operators which explicitly state the size. I'm not sure much is gained
by the comment, but I left them in:

#define ...     sizeof(struct cmpk_txfb_t)	  /* 20 */
#define	...     sizeof(struct cmpk_set_cfg_t)     /* 16 */


*** BLURB HERE ***

John Whitmore (10):
  staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
  staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style
  staging:rtl8192u: Rename bit definition ISR_TxBcnOk - Style
  staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style
  staging:rtl8192u: Rename ISR_TxBcnErr bit definition - Style
  staging:rtl8192u: Rename ISR_BcnTimerIntr - Style
  staging:rtl8192u: Remove multiple blank lines - Style
  staging:rtl8192u: Correct spelling in comments - style
  staging:rtl8192u: Remove typedef of struct cmpk_intr_sta_t - Style
  staging:rtl8192u: Remove typedef from struct cmpk_set_cfg_t - Style

 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 22 ++++++++---------
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 31 ++++++++++--------------
 2 files changed, 24 insertions(+), 29 deletions(-)

-- 
2.18.0


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

* [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-29  8:10   ` Greg KH
  2018-07-25 22:16 ` [PATCH 02/10] staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE " John Whitmore
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the typedef of the structure cmpk_txfb_t. This clears the
checkpatch issue with defining new types. This change is purely
a coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 8 ++++----
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 80672100ea26..0e3fccd4a55c 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -66,7 +66,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
  * Overview:
  *
  * Input:       PADAPTER	pAdapter
- *              CMPK_TXFB_T	*psTx_FB
+ *              STRUCT CMPK_TXFB_T	*psTx_FB
  *
  * Output:      NONE
  *
@@ -78,7 +78,7 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
  *
  *---------------------------------------------------------------------------
  */
-static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
+static void cmpk_count_txstatistic(struct net_device *dev, struct cmpk_txfb_t *pstx_fb)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
 #ifdef ENABLE_PS
@@ -163,7 +163,7 @@ static void cmpk_count_txstatistic(struct net_device *dev, cmpk_txfb_t *pstx_fb)
 static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
-	cmpk_txfb_t		rx_tx_fb;
+	struct cmpk_txfb_t rx_tx_fb;
 
 	priv->stats.txfeedback++;
 
@@ -173,7 +173,7 @@ static void cmpk_handle_tx_feedback(struct net_device *dev, u8 *pmsg)
 	 * endian type before copy the message copy.
 	 */
 	/* Use pointer to transfer structure memory. */
-	memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(cmpk_txfb_t));
+	memcpy((u8 *)&rx_tx_fb, pmsg, sizeof(struct cmpk_txfb_t));
 	/* 2. Use tx feedback info to count TX statistics. */
 	cmpk_count_txstatistic(dev, &rx_tx_fb);
 	/* Comment previous method for TX statistic function. */
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 85fb49ca7bc8..3f366e8317e6 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -2,7 +2,7 @@
 #ifndef R819XUSB_CMDPKT_H
 #define R819XUSB_CMDPKT_H
 /* Different command packet have dedicated message length and definition. */
-#define		CMPK_RX_TX_FB_SIZE		sizeof(cmpk_txfb_t)	/* 20 */
+#define		CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb_t)	/* 20 */
 #define		CMPK_TX_SET_CONFIG_SIZE		sizeof(cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_RX_TX_STS_SIZE		sizeof(cmpk_tx_status_t)
@@ -20,7 +20,7 @@
 /*------------------------------Define structure----------------------------*/
 /* Define different command packet structure. */
 /* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmpk_txfb_t {
 	/* DWORD 0 */
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
@@ -53,7 +53,7 @@ typedef struct tag_cmd_pkt_tx_feedback {
 	/* DWORD 5 */
 	u16	reserve3;
 	u16	duration;
-} cmpk_txfb_t;
+};
 
 /* 2. RX side: Interrupt status packet. It includes Beacon State,
  * Beacon Timer Interrupt and other useful informations in MAC ISR Reg.
-- 
2.18.0


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

* [PATCH 02/10] staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
  2018-07-25 22:16 ` [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 03/10] staging:rtl8192u: Rename bit definition ISR_TxBcnOk " John Whitmore
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the unused macro CMPK_TX_SET_CONFIG_SIZE. This is a coding style
change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 3f366e8317e6..095664a086e1 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -3,7 +3,6 @@
 #define R819XUSB_CMDPKT_H
 /* Different command packet have dedicated message length and definition. */
 #define		CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb_t)	/* 20 */
-#define		CMPK_TX_SET_CONFIG_SIZE		sizeof(cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_RX_TX_STS_SIZE		sizeof(cmpk_tx_status_t)
 #define		CMPK_RX_DBG_MSG_SIZE		sizeof(cmpk_rx_dbginfo_t)
-- 
2.18.0


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

* [PATCH 03/10] staging:rtl8192u: Rename bit definition ISR_TxBcnOk - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
  2018-07-25 22:16 ` [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
  2018-07-25 22:16 ` [PATCH 02/10] staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 04/10] staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE " John Whitmore
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the bit definition ISR_TxBcnOk to ISR_TX_BCN_OK. This change
clears the checkpatch issue with CamelCase naming. The change is a
coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 2 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 0e3fccd4a55c..96f705c85bb3 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -249,7 +249,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 		DMESG("interrupt status = 0x%x\n",
 		      rx_intr_status.interrupt_status);
 
-		if (rx_intr_status.interrupt_status & ISR_TxBcnOk) {
+		if (rx_intr_status.interrupt_status & ISR_TX_BCN_OK) {
 			priv->ieee80211->bibsscoordinator = true;
 			priv->stats.txbeaconokint++;
 		} else if (rx_intr_status.interrupt_status & ISR_TxBcnErr) {
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 095664a086e1..198bbcf3ba30 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -9,7 +9,7 @@
 #define		CMPK_TX_RAHIS_SIZE		sizeof(cmpk_tx_rahis_t)
 
 /* 2008/05/08 amy For USB constant. */
-#define ISR_TxBcnOk		BIT(27)		/* Transmit Beacon OK */
+#define ISR_TX_BCN_OK		BIT(27)		/* Transmit Beacon OK */
 #define ISR_TxBcnErr		BIT(26)		/* Transmit Beacon Error */
 #define ISR_BcnTimerIntr	BIT(13)		/* Beacon Timer Interrupt */
 
-- 
2.18.0


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

* [PATCH 04/10] staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (2 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 03/10] staging:rtl8192u: Rename bit definition ISR_TxBcnOk " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 05/10] staging:rtl8192u: Rename ISR_TxBcnErr bit definition " John Whitmore
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the unused macro definition CMPK_RX_DBG_MSG_SIZE. This is a
coding style change which should have no impact on runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 198bbcf3ba30..eb73b6a6d324 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -5,7 +5,6 @@
 #define		CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb_t)	/* 20 */
 #define		CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_RX_TX_STS_SIZE		sizeof(cmpk_tx_status_t)
-#define		CMPK_RX_DBG_MSG_SIZE		sizeof(cmpk_rx_dbginfo_t)
 #define		CMPK_TX_RAHIS_SIZE		sizeof(cmpk_tx_rahis_t)
 
 /* 2008/05/08 amy For USB constant. */
-- 
2.18.0


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

* [PATCH 05/10] staging:rtl8192u: Rename ISR_TxBcnErr bit definition - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (3 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 04/10] staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 06/10] staging:rtl8192u: Rename ISR_BcnTimerIntr " John Whitmore
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the bit definition ISR_TxBcnErr to ISR_TX_BCN_ERR. This change
clears the checkpatch issue with CamelCase naming. The change is purely
a coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 2 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 96f705c85bb3..ef777fd4b99d 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -252,7 +252,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 		if (rx_intr_status.interrupt_status & ISR_TX_BCN_OK) {
 			priv->ieee80211->bibsscoordinator = true;
 			priv->stats.txbeaconokint++;
-		} else if (rx_intr_status.interrupt_status & ISR_TxBcnErr) {
+		} else if (rx_intr_status.interrupt_status & ISR_TX_BCN_ERR) {
 			priv->ieee80211->bibsscoordinator = false;
 			priv->stats.txbeaconerr++;
 		}
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index eb73b6a6d324..4a0a1c24eb34 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -9,7 +9,7 @@
 
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TX_BCN_OK		BIT(27)		/* Transmit Beacon OK */
-#define ISR_TxBcnErr		BIT(26)		/* Transmit Beacon Error */
+#define ISR_TX_BCN_ERR		BIT(26)		/* Transmit Beacon Error */
 #define ISR_BcnTimerIntr	BIT(13)		/* Beacon Timer Interrupt */
 
 
-- 
2.18.0


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

* [PATCH 06/10] staging:rtl8192u: Rename ISR_BcnTimerIntr - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (4 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 05/10] staging:rtl8192u: Rename ISR_TxBcnErr bit definition " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 07/10] staging:rtl8192u: Remove multiple blank lines " John Whitmore
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Rename the bit definition ISR_BcnTimerIntr to ISR_BCN_TIMER_INTR. This
change clears the checkpatch issue with CamelCase naming. The change is
purely a style change and should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 2 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index ef777fd4b99d..44709068128c 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -257,7 +257,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 			priv->stats.txbeaconerr++;
 		}
 
-		if (rx_intr_status.interrupt_status & ISR_BcnTimerIntr)
+		if (rx_intr_status.interrupt_status & ISR_BCN_TIMER_INTR)
 			cmdpkt_beacontimerinterrupt_819xusb(dev);
 	}
 
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 4a0a1c24eb34..e9e0548ce96e 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -10,7 +10,7 @@
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TX_BCN_OK		BIT(27)		/* Transmit Beacon OK */
 #define ISR_TX_BCN_ERR		BIT(26)		/* Transmit Beacon Error */
-#define ISR_BcnTimerIntr	BIT(13)		/* Beacon Timer Interrupt */
+#define ISR_BCN_TIMER_INTR	BIT(13)		/* Beacon Timer Interrupt */
 
 
 /* Define element ID of command packet. */
-- 
2.18.0


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

* [PATCH 07/10] staging:rtl8192u: Remove multiple blank lines - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (5 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 06/10] staging:rtl8192u: Rename ISR_BcnTimerIntr " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 08/10] staging:rtl8192u: Correct spelling in comments - style John Whitmore
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove multiple blank lines, raise a checkpatch issue. This is purely
a coding style change which should not impact runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index e9e0548ce96e..672c8db804e1 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -12,7 +12,6 @@
 #define ISR_TX_BCN_ERR		BIT(26)		/* Transmit Beacon Error */
 #define ISR_BCN_TIMER_INTR	BIT(13)		/* Beacon Timer Interrupt */
 
-
 /* Define element ID of command packet. */
 
 /*------------------------------Define structure----------------------------*/
@@ -63,7 +62,6 @@ typedef struct tag_cmd_pkt_interrupt_status {
 	u32	interrupt_status;		/* Interrupt Status. */
 } cmpk_intr_sta_t;
 
-
 /* 3. TX side: Set configuration packet. */
 typedef struct tag_cmd_pkt_set_configuration {
 	u8	element_id;			/* Command packet type. */
@@ -189,5 +187,4 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 rt_status SendTxCommandPacket(struct net_device *dev,
 			      void *pData, u32 DataLen);
 
-
 #endif
-- 
2.18.0


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

* [PATCH 08/10] staging:rtl8192u: Correct spelling in comments - style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (6 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 07/10] staging:rtl8192u: Remove multiple blank lines " John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 09/10] staging:rtl8192u: Remove typedef of struct cmpk_intr_sta_t - Style John Whitmore
  2018-07-25 22:16 ` [PATCH 10/10] staging:rtl8192u: Remove typedef from struct cmpk_set_cfg_t " John Whitmore
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Correct the spelling of a number of comments, which caused a checkpatch
issue. This is purely a coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 672c8db804e1..40edf96451e3 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -53,7 +53,7 @@ struct cmpk_txfb_t {
 };
 
 /* 2. RX side: Interrupt status packet. It includes Beacon State,
- * Beacon Timer Interrupt and other useful informations in MAC ISR Reg.
+ * Beacon Timer Interrupt and other useful information in MAC ISR Reg.
  */
 typedef struct tag_cmd_pkt_interrupt_status {
 	u8	element_id;			/* Command packet type. */
@@ -80,7 +80,7 @@ typedef struct tag_cmd_pkt_set_configuration {
 	u32	mask;
 } cmpk_set_cfg_t;
 
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
+/* 4. Both side : TX/RX query configuration packet. The query structure is the
  *    same as set configuration.
  */
 #define		cmpk_query_cfg_t	cmpk_set_cfg_t
-- 
2.18.0


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

* [PATCH 09/10] staging:rtl8192u: Remove typedef of struct cmpk_intr_sta_t - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (7 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 08/10] staging:rtl8192u: Correct spelling in comments - style John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  2018-07-25 22:16 ` [PATCH 10/10] staging:rtl8192u: Remove typedef from struct cmpk_set_cfg_t " John Whitmore
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the typedef of struct cmpk_intr_sta_t. This clears the checkpatch
issue with creating new types in code. The change is purely a coding
style change and should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 6 +++---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 44709068128c..1f33353bc135 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -225,7 +225,7 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
  */
 static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_intr_sta_t		rx_intr_status;	/* */
+	struct cmpk_intr_sta_t		rx_intr_status;	/* */
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	DMESG("---> cmpk_Handle_Interrupt_Status()\n");
@@ -236,7 +236,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
 	 * endian type before copy the message copy.
 	 */
 	rx_intr_status.length = pmsg[1];
-	if (rx_intr_status.length != (sizeof(cmpk_intr_sta_t) - 2)) {
+	if (rx_intr_status.length != (sizeof(struct cmpk_intr_sta_t) - 2)) {
 		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
 		return;
 	}
@@ -528,7 +528,7 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
 
 		case RX_INTERRUPT_STATUS:
 			cmpk_handle_interrupt_status(dev, pcmd_buff);
-			cmd_length = sizeof(cmpk_intr_sta_t);
+			cmd_length = sizeof(struct cmpk_intr_sta_t);
 			break;
 
 		case BOTH_QUERY_CONFIG:
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 40edf96451e3..7854530f4745 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -55,12 +55,12 @@ struct cmpk_txfb_t {
 /* 2. RX side: Interrupt status packet. It includes Beacon State,
  * Beacon Timer Interrupt and other useful information in MAC ISR Reg.
  */
-typedef struct tag_cmd_pkt_interrupt_status {
+struct cmpk_intr_sta_t {
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
 	u16	reserve;
 	u32	interrupt_status;		/* Interrupt Status. */
-} cmpk_intr_sta_t;
+};
 
 /* 3. TX side: Set configuration packet. */
 typedef struct tag_cmd_pkt_set_configuration {
-- 
2.18.0


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

* [PATCH 10/10] staging:rtl8192u: Remove typedef from struct cmpk_set_cfg_t - Style
  2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
                   ` (8 preceding siblings ...)
  2018-07-25 22:16 ` [PATCH 09/10] staging:rtl8192u: Remove typedef of struct cmpk_intr_sta_t - Style John Whitmore
@ 2018-07-25 22:16 ` John Whitmore
  9 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-25 22:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, gregkh, pombredanne, kstewart, tglx, John Whitmore

Remove the typedef from struct cmpk_set_cfg_t. This change clears the
checkpatch issue with defining new types. The change is purely a coding
style change which should have no impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.c | 2 +-
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 1f33353bc135..490ee399169b 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -288,7 +288,7 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
  */
 static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
 {
-	cmpk_query_cfg_t	rx_query_cfg;
+	struct cmpk_query_cfg_t	rx_query_cfg;
 
 	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
 	/* It seems that FW use big endian(MIPS) and DRV use little endian in
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.h b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
index 7854530f4745..17d28244cb36 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.h
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.h
@@ -3,7 +3,7 @@
 #define R819XUSB_CMDPKT_H
 /* Different command packet have dedicated message length and definition. */
 #define		CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb_t)	/* 20 */
-#define		CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(cmpk_set_cfg_t)	/* 16 */
+#define		CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(struct cmpk_set_cfg_t)	/* 16 */
 #define		CMPK_RX_TX_STS_SIZE		sizeof(cmpk_tx_status_t)
 #define		CMPK_TX_RAHIS_SIZE		sizeof(cmpk_tx_rahis_t)
 
@@ -63,7 +63,7 @@ struct cmpk_intr_sta_t {
 };
 
 /* 3. TX side: Set configuration packet. */
-typedef struct tag_cmd_pkt_set_configuration {
+struct cmpk_set_cfg_t {
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
 	u16	reserve1;
@@ -78,7 +78,7 @@ typedef struct tag_cmd_pkt_set_configuration {
 	u8	cfg_offset;
 	u32	value;
 	u32	mask;
-} cmpk_set_cfg_t;
+};
 
 /* 4. Both side : TX/RX query configuration packet. The query structure is the
  *    same as set configuration.
-- 
2.18.0


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

* Re: [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
  2018-07-25 22:16 ` [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
@ 2018-07-29  8:10   ` Greg KH
  2018-07-29  9:46     ` John Whitmore
  0 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2018-07-29  8:10 UTC (permalink / raw)
  To: John Whitmore; +Cc: linux-kernel, devel, kstewart, pombredanne, tglx

On Wed, Jul 25, 2018 at 11:16:21PM +0100, John Whitmore wrote:
> -typedef struct tag_cmd_pkt_tx_feedback {
> +struct cmpk_txfb_t {
>  	/* DWORD 0 */
>  	u8	element_id;			/* Command packet type. */
>  	u8	length;				/* Command packet length. */
> @@ -53,7 +53,7 @@ typedef struct tag_cmd_pkt_tx_feedback {
>  	/* DWORD 5 */
>  	u16	reserve3;
>  	u16	duration;
> -} cmpk_txfb_t;
> +};

People use the "_t" to try to denote a "typedef".  When converting to
just a structure, there is no need to keep the _t anymore at all, so
this should just be "struct cmpk_txfb".

Or just drop the typedef and use the name for the struct they had here
already, "struct tag_cmd_pkt_tx_feedback", that also would work.

Same for all of the other patches in this series.

thanks,

greg k-h

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

* Re: [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style
  2018-07-29  8:10   ` Greg KH
@ 2018-07-29  9:46     ` John Whitmore
  0 siblings, 0 replies; 13+ messages in thread
From: John Whitmore @ 2018-07-29  9:46 UTC (permalink / raw)
  To: Greg KH; +Cc: John Whitmore, linux-kernel, devel, kstewart, pombredanne, tglx

On Sun, Jul 29, 2018 at 10:10:55AM +0200, Greg KH wrote:
> On Wed, Jul 25, 2018 at 11:16:21PM +0100, John Whitmore wrote:
> > -typedef struct tag_cmd_pkt_tx_feedback {
> > +struct cmpk_txfb_t {
> >  	/* DWORD 0 */
> >  	u8	element_id;			/* Command packet type. */
> >  	u8	length;				/* Command packet length. */
> > @@ -53,7 +53,7 @@ typedef struct tag_cmd_pkt_tx_feedback {
> >  	/* DWORD 5 */
> >  	u16	reserve3;
> >  	u16	duration;
> > -} cmpk_txfb_t;
> > +};
> 
> People use the "_t" to try to denote a "typedef".  When converting to
> just a structure, there is no need to keep the _t anymore at all, so
> this should just be "struct cmpk_txfb".
> 
> Or just drop the typedef and use the name for the struct they had here
> already, "struct tag_cmd_pkt_tx_feedback", that also would work.
> 
> Same for all of the other patches in this series.
> 
> thanks,
> 
> greg k-h

Oops again. Sorry, that should have occured to me. I'll fix up the affected
and resend.

thank you

jwhitmore

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

end of thread, other threads:[~2018-07-29  9:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 22:16 [PATCH 00/10] staging:rtl8192u: Coding style - r819xU_cmdpkt.h John Whitmore
2018-07-25 22:16 ` [PATCH 01/10] staging:rtl8192u: Remove typedef of struct cmpk_txfb_t - Style John Whitmore
2018-07-29  8:10   ` Greg KH
2018-07-29  9:46     ` John Whitmore
2018-07-25 22:16 ` [PATCH 02/10] staging:rtl8192u: Remove unused CMPK_TX_SET_CONFIG_SIZE " John Whitmore
2018-07-25 22:16 ` [PATCH 03/10] staging:rtl8192u: Rename bit definition ISR_TxBcnOk " John Whitmore
2018-07-25 22:16 ` [PATCH 04/10] staging:rtl8192u: Removed unused CMPK_RX_DBG_MSG_SIZE " John Whitmore
2018-07-25 22:16 ` [PATCH 05/10] staging:rtl8192u: Rename ISR_TxBcnErr bit definition " John Whitmore
2018-07-25 22:16 ` [PATCH 06/10] staging:rtl8192u: Rename ISR_BcnTimerIntr " John Whitmore
2018-07-25 22:16 ` [PATCH 07/10] staging:rtl8192u: Remove multiple blank lines " John Whitmore
2018-07-25 22:16 ` [PATCH 08/10] staging:rtl8192u: Correct spelling in comments - style John Whitmore
2018-07-25 22:16 ` [PATCH 09/10] staging:rtl8192u: Remove typedef of struct cmpk_intr_sta_t - Style John Whitmore
2018-07-25 22:16 ` [PATCH 10/10] staging:rtl8192u: Remove typedef from struct cmpk_set_cfg_t " John Whitmore

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.