Skip to contentSkip to conversation

Staging rtl8192u: Remove typedefs.

PATCH Superseded Ksenija Stanojevic 3 participants 5 messages Feb 27, 2015 – Mar 2, 2015 1 message not in the archive Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 Staging rtl8192u: Remove typedefs.

In reply to a message not in the archive

This patch removes typedefs from structures and renames them per kernel coding standards.
Issue found by checkpatch.pl

---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 53 +++++++++++++++-----------------
 1 file changed, 25 insertions(+), 28 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +25 -28
index 52cd437..8e0ec40 100644
@@ -1,12 +1,12 @@
 #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_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)
-#define		CMPK_TX_RAHIS_SIZE		sizeof(cmpk_tx_rahis_t)
+#define	 CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb)    /* 20 */
+#define	 CMPK_TX_SET_CONFIG_SIZE	sizeof(struct cmpk_set_cfg) /* 16 */
+#define	 CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(struct cmpk_set_cfg) /* 16 */
+#define	 CMPK_RX_TX_STS_SIZE		sizeof(struct cmpk_tx_status)
+#define	 CMPK_RX_DBG_MSG_SIZE		sizeof(struct cmpk_rx_dbginfo)
+#define	 CMPK_TX_RAHIS_SIZE		sizeof(struct cmpk_tx_rahis)
 
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TxBcnOk		BIT27		/* Transmit Beacon OK */
@@ -19,7 +19,7 @@
 /*------------------------------Define structure----------------------------*/
 /* Define different command packet structure. */
 /* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmpk_txfb {
 	/* DWORD 0 */
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
@@ -52,20 +52,20 @@ 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. */
-typedef struct tag_cmd_pkt_interrupt_status {
+struct cmpk_intr_sta {
 	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 {
+struct cmpk_set_cfg {
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
 	u16	reserve1;
@@ -80,14 +80,11 @@ typedef struct tag_cmd_pkt_set_configuration {
 	u8	cfg_offset;
 	u32	value;
 	u32	mask;
-} cmpk_set_cfg_t;
+};
 
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
-      same as set configuration. */
-#define		cmpk_query_cfg_t	cmpk_set_cfg_t
 
 /* 5. Multi packet feedback status. */
-typedef struct tag_tx_stats_feedback {
+struct cmpk_tx_status {
 	/* For endian transfer --> Driver will not the same as
 	   firmware structure. */
 	/* DW 0 */
@@ -124,11 +121,11 @@ typedef struct tag_tx_stats_feedback {
 	u16	reserve3_23;
 	u8	reserve3_1;
 	u8	rate;
-} __packed cmpk_tx_status_t;
+};
 
 /* 6. Debug feedback message. */
 /* Define RX debug message  */
-typedef struct tag_rx_debug_message_feedback {
+struct cmpk_rx_dbginfo {
 	/* For endian transfer --> for driver */
 	/* DW 0 */
 	u16	reserve1;
@@ -138,10 +135,10 @@ typedef struct tag_rx_debug_message_feedback {
 	/* DW 1-?? */
 	/* Variable debug message. */
 
-} cmpk_rx_dbginfo_t;
+};
 
 /* Define transmit rate history. For big endian format. */
-typedef struct tag_tx_rate_history {
+struct cmpk_tx_rahis {
 	/* For endian transfer --> for driver */
 	/* DW 0 */
 	u8	element_id;			/* Command packet type */
@@ -161,9 +158,9 @@ typedef struct tag_tx_rate_history {
 	 */
 	u16	ht_mcs[4][16];
 
-} __packed cmpk_tx_rahis_t;
+};
 
-typedef enum tag_command_packet_directories {
+enum cmpk_element {
 	RX_TX_FEEDBACK			= 0,
 	RX_INTERRUPT_STATUS		= 1,
 	TX_SET_CONFIG			= 2,
@@ -173,19 +170,19 @@ typedef enum tag_command_packet_directories {
 	RX_TX_PER_PKT_FEEDBACK		= 6,
 	RX_TX_RATE_HISTORY		= 7,
 	RX_CMD_ELE_MAX
-} cmpk_element_e;
+};
 
-typedef enum _rt_status {
+enum rt_status {
 	RT_STATUS_SUCCESS,
 	RT_STATUS_FAILURE,
 	RT_STATUS_PENDING,
 	RT_STATUS_RESOURCE
-} rt_status, *prt_status;
+};
 
 extern u32 cmpk_message_handle_rx(struct net_device *dev,
-		struct ieee80211_rx_stats *pstats);
-extern rt_status SendTxCommandPacket(struct net_device *dev,
-		void *pData, u32 DataLen);
+				  struct ieee80211_rx_stats *pstats);
+extern enum rt_status SendTxCommandPacket(struct net_device *dev,
+					  void *pData, u32 DataLen);
 
 
 #endif
Signature · 1 line
1.9.1
#2 lore raw
Quoted 3 lines · Ksenija Stanojevic

This patch removes typedefs from structures and renames them per kernel coding standards.
Issue found by checkpatch.pl

There are other things in this patch.

julia

Quoted 155 lines
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 53 +++++++++++++++-----------------
 1 file changed, 25 insertions(+), 28 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +25 -29
index 52cd437..8e0ec40 100644
@@ -1,12 +1,12 @@
 #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_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)
-#define		CMPK_TX_RAHIS_SIZE		sizeof(cmpk_tx_rahis_t)
+#define	 CMPK_RX_TX_FB_SIZE		sizeof(struct cmpk_txfb)    /* 20 */
+#define	 CMPK_TX_SET_CONFIG_SIZE	sizeof(struct cmpk_set_cfg) /* 16 */
+#define	 CMPK_BOTH_QUERY_CONFIG_SIZE	sizeof(struct cmpk_set_cfg) /* 16 */
+#define	 CMPK_RX_TX_STS_SIZE		sizeof(struct cmpk_tx_status)
+#define	 CMPK_RX_DBG_MSG_SIZE		sizeof(struct cmpk_rx_dbginfo)
+#define	 CMPK_TX_RAHIS_SIZE		sizeof(struct cmpk_tx_rahis)
 
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TxBcnOk		BIT27		/* Transmit Beacon OK */
@@ -19,7 +19,7 @@
 /*------------------------------Define structure----------------------------*/
 /* Define different command packet structure. */
 /* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmpk_txfb {
 	/* DWORD 0 */
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
@@ -52,20 +52,20 @@ 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. */
-typedef struct tag_cmd_pkt_interrupt_status {
+struct cmpk_intr_sta {
 	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 {
+struct cmpk_set_cfg {
 	u8	element_id;			/* Command packet type. */
 	u8	length;				/* Command packet length. */
 	u16	reserve1;
@@ -80,14 +80,11 @@ typedef struct tag_cmd_pkt_set_configuration {
 	u8	cfg_offset;
 	u32	value;
 	u32	mask;
-} cmpk_set_cfg_t;
+};
 
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
-      same as set configuration. */
-#define		cmpk_query_cfg_t	cmpk_set_cfg_t
 
 /* 5. Multi packet feedback status. */
-typedef struct tag_tx_stats_feedback {
+struct cmpk_tx_status {
 	/* For endian transfer --> Driver will not the same as
 	   firmware structure. */
 	/* DW 0 */
@@ -124,11 +121,11 @@ typedef struct tag_tx_stats_feedback {
 	u16	reserve3_23;
 	u8	reserve3_1;
 	u8	rate;
-} __packed cmpk_tx_status_t;
+};
 
 /* 6. Debug feedback message. */
 /* Define RX debug message  */
-typedef struct tag_rx_debug_message_feedback {
+struct cmpk_rx_dbginfo {
 	/* For endian transfer --> for driver */
 	/* DW 0 */
 	u16	reserve1;
@@ -138,10 +135,10 @@ typedef struct tag_rx_debug_message_feedback {
 	/* DW 1-?? */
 	/* Variable debug message. */
 
-} cmpk_rx_dbginfo_t;
+};
 
 /* Define transmit rate history. For big endian format. */
-typedef struct tag_tx_rate_history {
+struct cmpk_tx_rahis {
 	/* For endian transfer --> for driver */
 	/* DW 0 */
 	u8	element_id;			/* Command packet type */
@@ -161,9 +158,9 @@ typedef struct tag_tx_rate_history {
 	 */
 	u16	ht_mcs[4][16];
 
-} __packed cmpk_tx_rahis_t;
+};
 
-typedef enum tag_command_packet_directories {
+enum cmpk_element {
 	RX_TX_FEEDBACK			= 0,
 	RX_INTERRUPT_STATUS		= 1,
 	TX_SET_CONFIG			= 2,
@@ -173,19 +170,19 @@ typedef enum tag_command_packet_directories {
 	RX_TX_PER_PKT_FEEDBACK		= 6,
 	RX_TX_RATE_HISTORY		= 7,
 	RX_CMD_ELE_MAX
-} cmpk_element_e;
+};
 
-typedef enum _rt_status {
+enum rt_status {
 	RT_STATUS_SUCCESS,
 	RT_STATUS_FAILURE,
 	RT_STATUS_PENDING,
 	RT_STATUS_RESOURCE
-} rt_status, *prt_status;
+};
 
 extern u32 cmpk_message_handle_rx(struct net_device *dev,
-		struct ieee80211_rx_stats *pstats);
-extern rt_status SendTxCommandPacket(struct net_device *dev,
-		void *pData, u32 DataLen);
+				  struct ieee80211_rx_stats *pstats);
+extern enum rt_status SendTxCommandPacket(struct net_device *dev,
+					  void *pData, u32 DataLen);
 
 
 #endif
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4f46244ec99ca7d088e094221b36c2be29bd4a27.1425069407.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw
Quoted 9 lines · Julia Lawall
Quoted 3 lines · Ksenija Stanojevic

This patch removes typedefs from structures and renames them per kernel coding standards.
Issue found by checkpatch.pl

There are other things in this patch.

julia

Yes, where ever I put struct or enum, I have to make sure that thing are aligned well and that the line doesn't exceed 80 character mark. And I also removed macro cmpk_query_cfg_t, because it's the same as the struct above, and I removed also it's comment.

Ksenija

Quoted 155 lines
Quoted 155 lines
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 53 +++++++++++++++-----------------
 1 file changed, 25 insertions(+), 28 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +25 -29
index 52cd437..8e0ec40 100644
@@ -1,12 +1,12 @@
 #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_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)
-#define              CMPK_TX_RAHIS_SIZE              sizeof(cmpk_tx_rahis_t)
+#define       CMPK_RX_TX_FB_SIZE             sizeof(struct cmpk_txfb)    /* 20 */
+#define       CMPK_TX_SET_CONFIG_SIZE        sizeof(struct cmpk_set_cfg) /* 16 */
+#define       CMPK_BOTH_QUERY_CONFIG_SIZE    sizeof(struct cmpk_set_cfg) /* 16 */
+#define       CMPK_RX_TX_STS_SIZE            sizeof(struct cmpk_tx_status)
+#define       CMPK_RX_DBG_MSG_SIZE           sizeof(struct cmpk_rx_dbginfo)
+#define       CMPK_TX_RAHIS_SIZE             sizeof(struct cmpk_tx_rahis)
 
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TxBcnOk          BIT27           /* Transmit Beacon OK */
@@ -19,7 +19,7 @@
 /*------------------------------Define structure----------------------------*/
 /* Define different command packet structure. */
 /* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmpk_txfb {
      /* DWORD 0 */
      u8      element_id;                     /* Command packet type. */
      u8      length;                         /* Command packet length. */
@@ -52,20 +52,20 @@ 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. */
-typedef struct tag_cmd_pkt_interrupt_status {
+struct cmpk_intr_sta {
      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 {
+struct cmpk_set_cfg {
      u8      element_id;                     /* Command packet type. */
      u8      length;                         /* Command packet length. */
      u16     reserve1;
@@ -80,14 +80,11 @@ typedef struct tag_cmd_pkt_set_configuration {
      u8      cfg_offset;
      u32     value;
      u32     mask;
-} cmpk_set_cfg_t;
+};
 
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
-      same as set configuration. */
-#define              cmpk_query_cfg_t        cmpk_set_cfg_t
 
 /* 5. Multi packet feedback status. */
-typedef struct tag_tx_stats_feedback {
+struct cmpk_tx_status {
      /* For endian transfer --> Driver will not the same as
         firmware structure. */
      /* DW 0 */
@@ -124,11 +121,11 @@ typedef struct tag_tx_stats_feedback {
      u16     reserve3_23;
      u8      reserve3_1;
      u8      rate;
-} __packed cmpk_tx_status_t;
+};
 
 /* 6. Debug feedback message. */
 /* Define RX debug message  */
-typedef struct tag_rx_debug_message_feedback {
+struct cmpk_rx_dbginfo {
      /* For endian transfer --> for driver */
      /* DW 0 */
      u16     reserve1;
@@ -138,10 +135,10 @@ typedef struct tag_rx_debug_message_feedback {
      /* DW 1-?? */
      /* Variable debug message. */
 
-} cmpk_rx_dbginfo_t;
+};
 
 /* Define transmit rate history. For big endian format. */
-typedef struct tag_tx_rate_history {
+struct cmpk_tx_rahis {
      /* For endian transfer --> for driver */
      /* DW 0 */
      u8      element_id;                     /* Command packet type */
@@ -161,9 +158,9 @@ typedef struct tag_tx_rate_history {
       */
      u16     ht_mcs[4][16];
 
-} __packed cmpk_tx_rahis_t;
+};
 
-typedef enum tag_command_packet_directories {
+enum cmpk_element {
      RX_TX_FEEDBACK                  = 0,
      RX_INTERRUPT_STATUS             = 1,
      TX_SET_CONFIG                   = 2,
@@ -173,19 +170,19 @@ typedef enum tag_command_packet_directories {
      RX_TX_PER_PKT_FEEDBACK          = 6,
      RX_TX_RATE_HISTORY              = 7,
      RX_CMD_ELE_MAX
-} cmpk_element_e;
+};
 
-typedef enum _rt_status {
+enum rt_status {
      RT_STATUS_SUCCESS,
      RT_STATUS_FAILURE,
      RT_STATUS_PENDING,
      RT_STATUS_RESOURCE
-} rt_status, *prt_status;
+};
 
 extern u32 cmpk_message_handle_rx(struct net_device *dev,
-             struct ieee80211_rx_stats *pstats);
-extern rt_status SendTxCommandPacket(struct net_device *dev,
-             void *pData, u32 DataLen);
+                               struct ieee80211_rx_stats *pstats);
+extern enum rt_status SendTxCommandPacket(struct net_device *dev,
+                                       void *pData, u32 DataLen);
 
 
 #endif
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4f46244ec99ca7d088e094221b36c2be29bd4a27.1425069407.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#4 lore raw
Quoted 7 lines · Ksenija Stanojević
Quoted 6 lines · Julia Lawall
Quoted 3 lines · Ksenija Stanojevic

This patch removes typedefs from structures and renames them per kernel coding standards.
Issue found by checkpatch.pl

Quoted 8 lines
Quoted 3 lines

There are other things in this patch.

julia

Yes, where ever I put struct or enum, I have to make sure that thing are aligned well and that the line doesn't exceed 80 character mark. And I also removed macro cmpk_query_cfg_t, because it's the same as the struct above, and I removed also it's comment.

Ah, OK, I didn't see the type references in the #define.

julia

Quoted 166 lines

Ksenija

Quoted 148 lines
Quoted 148 lines
---
 drivers/staging/rtl8192u/r819xU_cmdpkt.h | 53 +++++++++++++++-----------------
 1 file changed, 25 insertions(+), 28 deletions(-)
drivers/staging/rtl8192u/r819xU_cmdpkt.h +25 -29
index 52cd437..8e0ec40 100644
@@ -1,12 +1,12 @@
 #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_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)
-#define              CMPK_TX_RAHIS_SIZE              sizeof(cmpk_tx_rahis_t)
+#define       CMPK_RX_TX_FB_SIZE             sizeof(struct cmpk_txfb)    /* 20 */
+#define       CMPK_TX_SET_CONFIG_SIZE        sizeof(struct cmpk_set_cfg) /* 16 */
+#define       CMPK_BOTH_QUERY_CONFIG_SIZE    sizeof(struct cmpk_set_cfg) /* 16 */
+#define       CMPK_RX_TX_STS_SIZE            sizeof(struct cmpk_tx_status)
+#define       CMPK_RX_DBG_MSG_SIZE           sizeof(struct cmpk_rx_dbginfo)
+#define       CMPK_TX_RAHIS_SIZE             sizeof(struct cmpk_tx_rahis)
 
 /* 2008/05/08 amy For USB constant. */
 #define ISR_TxBcnOk          BIT27           /* Transmit Beacon OK */
@@ -19,7 +19,7 @@
 /*------------------------------Define structure----------------------------*/
 /* Define different command packet structure. */
 /* 1. RX side: TX feedback packet. */
-typedef struct tag_cmd_pkt_tx_feedback {
+struct cmpk_txfb {
      /* DWORD 0 */
      u8      element_id;                     /* Command packet type. */
      u8      length;                         /* Command packet length. */
@@ -52,20 +52,20 @@ 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. */
-typedef struct tag_cmd_pkt_interrupt_status {
+struct cmpk_intr_sta {
      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 {
+struct cmpk_set_cfg {
      u8      element_id;                     /* Command packet type. */
      u8      length;                         /* Command packet length. */
      u16     reserve1;
@@ -80,14 +80,11 @@ typedef struct tag_cmd_pkt_set_configuration {
      u8      cfg_offset;
      u32     value;
      u32     mask;
-} cmpk_set_cfg_t;
+};
 
-/* 4. Both side : TX/RX query configuraton packet. The query structure is the
-      same as set configuration. */
-#define              cmpk_query_cfg_t        cmpk_set_cfg_t
 
 /* 5. Multi packet feedback status. */
-typedef struct tag_tx_stats_feedback {
+struct cmpk_tx_status {
      /* For endian transfer --> Driver will not the same as
         firmware structure. */
      /* DW 0 */
@@ -124,11 +121,11 @@ typedef struct tag_tx_stats_feedback {
      u16     reserve3_23;
      u8      reserve3_1;
      u8      rate;
-} __packed cmpk_tx_status_t;
+};
 
 /* 6. Debug feedback message. */
 /* Define RX debug message  */
-typedef struct tag_rx_debug_message_feedback {
+struct cmpk_rx_dbginfo {
      /* For endian transfer --> for driver */
      /* DW 0 */
      u16     reserve1;
@@ -138,10 +135,10 @@ typedef struct tag_rx_debug_message_feedback {
      /* DW 1-?? */
      /* Variable debug message. */
 
-} cmpk_rx_dbginfo_t;
+};
 
 /* Define transmit rate history. For big endian format. */
-typedef struct tag_tx_rate_history {
+struct cmpk_tx_rahis {
      /* For endian transfer --> for driver */
      /* DW 0 */
      u8      element_id;                     /* Command packet type */
@@ -161,9 +158,9 @@ typedef struct tag_tx_rate_history {
       */
      u16     ht_mcs[4][16];
 
-} __packed cmpk_tx_rahis_t;
+};
 
-typedef enum tag_command_packet_directories {
+enum cmpk_element {
      RX_TX_FEEDBACK                  = 0,
      RX_INTERRUPT_STATUS             = 1,
      TX_SET_CONFIG                   = 2,
@@ -173,19 +170,19 @@ typedef enum tag_command_packet_directories {
      RX_TX_PER_PKT_FEEDBACK          = 6,
      RX_TX_RATE_HISTORY              = 7,
      RX_CMD_ELE_MAX
-} cmpk_element_e;
+};
 
-typedef enum _rt_status {
+enum rt_status {
      RT_STATUS_SUCCESS,
      RT_STATUS_FAILURE,
      RT_STATUS_PENDING,
      RT_STATUS_RESOURCE
-} rt_status, *prt_status;
+};
 
 extern u32 cmpk_message_handle_rx(struct net_device *dev,
-             struct ieee80211_rx_stats *pstats);
-extern rt_status SendTxCommandPacket(struct net_device *dev,
-             void *pData, u32 DataLen);
+                               struct ieee80211_rx_stats *pstats);
+extern enum rt_status SendTxCommandPacket(struct net_device *dev,
+                                       void *pData, u32 DataLen);
 
 
 #endif
--

1.9.1

Quoted 7 lines
Quoted 7 lines

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4f46244ec99ca7d088e094221b36c2be29bd4a27.1425069407.git.ksenija.stanojevic%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAL7P5j%2BA3PdERuhdPqcpdrknwUwfjOzRO%3DnZ9Us4Nudm_tgRQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

maintainer
#5 lore raw
In reply to Ksenija Stanojević
Quoted 7 lines · Ksenija Stanojević
Quoted 6 lines · Julia Lawall
Quoted 3 lines · Ksenija Stanojevic

This patch removes typedefs from structures and renames them per kernel coding standards.
Issue found by checkpatch.pl

Quoted 8 lines
Quoted 3 lines

There are other things in this patch.

julia

Yes, where ever I put struct or enum, I have to make sure that thing are aligned well and that the line doesn't exceed 80 character mark. And I also removed macro cmpk_query_cfg_t, because it's the same as the struct above, and I removed also it's comment.

Then please put this in the changelog comment so we know you are doing this.

Please resend with this information.

thanks,

greg k-h