Skip to contentSkip to conversation

staging: rtl8723bs: include: remove typedef of

PATCH Superseded Himadri Pandya 2 participants 8 messages Mar 21, 2019 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: include: remove typedef of

This patchset removes typedefs from various structures defined in /staging/rtl8723bs/include/rtw_pwrctrl.h as The Linux kernel coding style guidelines discourage the use of typedefs for struct types.

Himadri Pandya (5):
staging: rtl8723bs: include: remove typedef for struct pno_nlo_info
staging: rtl8723bs: include: remove typedef for struct pno_ssid
staging: rtl8723bs: include: remove typedef for struct pno_ssid_list
staging: rtl8723bs: include: remove typedef for struct
pno_scan_channel_info
staging: rtl8723bs: include: remove typedef for struct pno_scan_info

 .../staging/rtl8723bs/include/rtw_pwrctrl.h   | 30 +++++++++----------
 1 file changed, 15 insertions(+), 15 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/5 staging: rtl8723bs: include: remove typedef for struct pno_nlo_info

Remove typedef for struct pno_nlo_info as the Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +3 -3
index e2a4c680125f..011a5685c2ff 100644
@@ -159,7 +159,7 @@ enum PS_DENY_REASON {
 };
 
 #ifdef CONFIG_PNO_SUPPORT
-typedef struct pno_nlo_info
+struct pno_nlo_info
 {
 	u32 fast_scan_period;				/* Fast scan period */
 	u32 ssid_num;				/* number of entry */
@@ -168,7 +168,7 @@ typedef struct pno_nlo_info
 	u8 ssid_length[MAX_PNO_LIST_COUNT];	/* SSID Length Array */
 	u8 ssid_cipher_info[MAX_PNO_LIST_COUNT];	/* Cipher information for security */
 	u8 ssid_channel_info[MAX_PNO_LIST_COUNT];	/* channel information */
-}pno_nlo_info_t;
+};
 
 typedef struct pno_ssid {
 	u32 	SSID_len;
@@ -279,7 +279,7 @@ struct pwrctrl_priv
 #ifdef CONFIG_PNO_SUPPORT
 	u8 pno_in_resume;
 	u8 pno_inited;
-	pno_nlo_info_t	*pnlo_info;
+	struct pno_nlo_info	*pnlo_info;
 	pno_scan_info_t	*pscan_info;
 	pno_ssid_list_t	*pno_ssid_list;
 #endif
Signature · 1 line
2.17.1
#2 lore raw

Re: [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: include: remove typedef for struct pno_nlo_info

Quoted 31 lines · Himadri Pandya

Remove typedef for struct pno_nlo_info as the Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +2 -2
index e2a4c680125f..011a5685c2ff 100644
@@ -159,7 +159,7 @@ enum PS_DENY_REASON {
 };
 
 #ifdef CONFIG_PNO_SUPPORT
-typedef struct pno_nlo_info
+struct pno_nlo_info
 {
 	u32 fast_scan_period;				/* Fast scan period */
 	u32 ssid_num;				/* number of entry */
@@ -168,7 +168,7 @@ typedef struct pno_nlo_info
 	u8 ssid_length[MAX_PNO_LIST_COUNT];	/* SSID Length Array */
 	u8 ssid_cipher_info[MAX_PNO_LIST_COUNT];	/* Cipher information for security */
 	u8 ssid_channel_info[MAX_PNO_LIST_COUNT];	/* channel information */
-}pno_nlo_info_t;
+};
 
 typedef struct pno_ssid {
 	u32 	SSID_len;

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h struct pwrctrl_priv · line 282

Quoted 5 lines
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -1
@@ -279,7 +279,7 @@ struct pwrctrl_priv
 #ifdef CONFIG_PNO_SUPPORT
 	u8 pno_in_resume;
 	u8 pno_inited;
-	pno_nlo_info_t	*pnlo_info;
+	struct pno_nlo_info	*pnlo_info;

I don't think the big space is needed before pnlo_info. It was to line up with the other fields, but it doesn't align any more.

julia

Quoted 13 lines
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -1
 	pno_scan_info_t	*pscan_info;
 	pno_ssid_list_t	*pno_ssid_list;
 #endif
--

2.17.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/20190321120908.43680-2-himadri18.07%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw

Re: [Outreachy kernel] [PATCH 1/5] staging: rtl8723bs: include: remove typedef for struct pno_nlo_info

Quoted 48 lines · Julia Lawall,

Review

Quoted 9 lines · Himadri Pandya

Remove typedef for struct pno_nlo_info as the Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h enum PS_DENY_REASON { · line 164

Quoted 11 lines

index e2a4c680125f..011a5685c2ff 100644

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -1
@@ -159,7 +159,7 @@ enum PS_DENY_REASON {
 };
 
 #ifdef CONFIG_PNO_SUPPORT
-typedef struct pno_nlo_info
+struct pno_nlo_info
 {
      u32 fast_scan_period;                           /* Fast scan

period */

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h typedef struct pno_nlo_info · line 169

Quoted 4 lines
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -0
      u32 ssid_num;                           /* number of entry */
@@ -168,7 +168,7 @@ typedef struct pno_nlo_info
      u8 ssid_length[MAX_PNO_LIST_COUNT];     /* SSID Length Array */
      u8 ssid_cipher_info[MAX_PNO_LIST_COUNT];        /* Cipher

information for security */

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h typedef struct pno_nlo_info · line 170

Quoted 1 line
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -0
      u8 ssid_channel_info[MAX_PNO_LIST_COUNT];       /* channel

information */

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h struct pwrctrl_priv · line 282

Quoted 11 lines
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +2 -2
-}pno_nlo_info_t;
+};
 
 typedef struct pno_ssid {
      u32     SSID_len;
@@ -279,7 +279,7 @@ struct pwrctrl_priv
 #ifdef CONFIG_PNO_SUPPORT
      u8 pno_in_resume;
      u8 pno_inited;
-     pno_nlo_info_t  *pnlo_info;
+     struct pno_nlo_info     *pnlo_info;

I don't think the big space is needed before pnlo_info. It was to line up with the other fields, but it doesn't align any more.

Quoted 2 lines

julia

Okay. Sending version 2.

Thank you.

- Himadri

Quoted 29 lines
Quoted 8 lines
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -1
      pno_scan_info_t *pscan_info;
      pno_ssid_list_t *pno_ssid_list;
 #endif
--

2.17.1

--
You received this message because you are subscribed to the Google

Groups "outreachy-kernel" group.

Quoted 1 line

To unsubscribe from this group and stop receiving emails from it, send

an email to [email protected].

Quoted 2 lines

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/20190321120908.43680-2-himadri18.07%40gmail.com
.

Quoted 2 lines

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/alpine.DEB.2.20.1903211426570.4279%40hadrien
.
For more options, visit https://groups.google.com/d/optout.

#4 lore raw

PATCH 2/5 staging: rtl8723bs: include: remove typedef for struct pno_ssid

In reply to Himadri Pandya

Remove typedef for struct pno_ssid as The Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +3 -3
index 011a5685c2ff..a08b27c65a31 100644
@@ -170,13 +170,13 @@ struct pno_nlo_info
 	u8 ssid_channel_info[MAX_PNO_LIST_COUNT];	/* channel information */
 };
 
-typedef struct pno_ssid {
+struct pno_ssid {
 	u32 	SSID_len;
 	u8 SSID[32];
-} pno_ssid_t;
+};
 
 typedef struct pno_ssid_list {
-	pno_ssid_t	node[MAX_PNO_LIST_COUNT];
+	struct pno_ssid	node[MAX_PNO_LIST_COUNT];
 }pno_ssid_list_t;
 
 typedef struct pno_scan_channel_info
Signature · 1 line
2.17.1
#5 lore raw

PATCH 3/5 staging: rtl8723bs: include: remove typedef for struct pno_ssid_list

In reply to Himadri Pandya

Remove typedef from struct pno_ssid_list as The Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +3 -3
index a08b27c65a31..dbb7bea28a13 100644
@@ -175,9 +175,9 @@ struct pno_ssid {
 	u8 SSID[32];
 };
 
-typedef struct pno_ssid_list {
+struct pno_ssid_list {
 	struct pno_ssid	node[MAX_PNO_LIST_COUNT];
-}pno_ssid_list_t;
+};
 
 typedef struct pno_scan_channel_info
 {
@@ -281,7 +281,7 @@ struct pwrctrl_priv
 	u8 pno_inited;
 	struct pno_nlo_info	*pnlo_info;
 	pno_scan_info_t	*pscan_info;
-	pno_ssid_list_t	*pno_ssid_list;
+	struct pno_ssid_list	*pno_ssid_list;
 #endif
 	u32 	wowlan_pattern_context[8][5];
 	u64		wowlan_fw_iv;
Signature · 1 line
2.17.1
#6 lore raw

PATCH 4/5 staging: rtl8723bs: include: remove typedef for struct pno_scan_channel_info

In reply to Himadri Pandya

Remove typedef for struct pno_scan_channel_info as The Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +3 -3
index dbb7bea28a13..5aeaf98f459d 100644
@@ -179,13 +179,13 @@ struct pno_ssid_list {
 	struct pno_ssid	node[MAX_PNO_LIST_COUNT];
 };
 
-typedef struct pno_scan_channel_info
+struct pno_scan_channel_info
 {
 	u8 channel;
 	u8 tx_power;
 	u8 timeout;
 	u8 active;				/* set 1 means active scan, or pasivite scan. */
-}pno_scan_channel_info_t;
+};
 
 typedef struct pno_scan_info
 {
@@ -198,7 +198,7 @@ typedef struct pno_scan_info
 	u8 orig_ch;			/* original channel */
 	u8 channel_num;			/* number of channel */
 	u64	rfe_type;			/* rfe_type && 0x00000000000000ff */
-	pno_scan_channel_info_t ssid_channel_info[MAX_SCAN_LIST_COUNT];
+	struct pno_scan_channel_info ssid_channel_info[MAX_SCAN_LIST_COUNT];
 }pno_scan_info_t;
 #endif /* CONFIG_PNO_SUPPORT */
 
Signature · 1 line
2.17.1
#7 lore raw

PATCH 5/5 staging: rtl8723bs: include: remove typedef for struct pno_scan_info

In reply to Himadri Pandya

Remove typedef for struct pno_scan_info as The Linux kernel coding style guidelines discourage the use of typedefs for struct types.

---
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +3 -3
index 5aeaf98f459d..a0abd5ddb4f5 100644
@@ -187,7 +187,7 @@ struct pno_scan_channel_info
 	u8 active;				/* set 1 means active scan, or pasivite scan. */
 };
 
-typedef struct pno_scan_info
+struct pno_scan_info
 {
 	u8 enableRFE;			/* Enable RFE */
 	u8 period_scan_time;		/* exclusive with fast_scan_period and slow_scan_period */
@@ -199,7 +199,7 @@ typedef struct pno_scan_info
 	u8 channel_num;			/* number of channel */
 	u64	rfe_type;			/* rfe_type && 0x00000000000000ff */
 	struct pno_scan_channel_info ssid_channel_info[MAX_SCAN_LIST_COUNT];
-}pno_scan_info_t;
+};
 #endif /* CONFIG_PNO_SUPPORT */
 
 struct pwrctrl_priv
@@ -280,7 +280,7 @@ struct pwrctrl_priv
 	u8 pno_in_resume;
 	u8 pno_inited;
 	struct pno_nlo_info	*pnlo_info;
-	pno_scan_info_t	*pscan_info;
+	struct pno_scan_info	*pscan_info;
 	struct pno_ssid_list	*pno_ssid_list;
 #endif
 	u32 	wowlan_pattern_context[8][5];
Signature · 1 line
2.17.1