staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag
PATCH 1/1 staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag
Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses in the code.
--- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192u/r8192U.h +2 -2
@@ -793,12 +793,12 @@ typedef struct _phy_cck_rx_status_report_819xusb { } phy_sts_cck_819xusb_t; -typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag { +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {u8 reserved:4 ;u8 rxsc:2 ;u8 sgi_en:1 ;u8 ex_intf_flag:1 ; -}phy_ofdm_rx_status_rxsc_sgien_exintfflag ; +}; typedef enum _RT_CUSTOMER_ID { RT_CID_DEFAULT = 0,
drivers/staging/rtl8192u/r8192U_core.c +2 -2
@@ -4242,7 +4242,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, {phy_sts_ofdm_819xusb_t *pofdm_buf;phy_sts_cck_819xusb_t *pcck_buf; -phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc; +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;u8 *prxpkt;u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;s8 rx_pwr[4 ], rx_pwr_all =0 ;
@@ -4432,7 +4432,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,/* record rx statistics for debug */ rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; - prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *) + prxsc = (struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *) &rxsc_sgien_exflg;if (pdrvinfo->BW)/* 40M channel */ priv->stats.received_bwtype[1 + prxsc->rxsc]++;
Signature · 1 line
2.7.4
Quoted 14 lines · simran singhal
Remove typdef
phy_ofdm_rx_status_rxsc_sgien_exintfflagand replace its uses in the code.Signed-off-by simran singhal <[email protected]>--- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8192u/r8192U.h +0
-0
drivers/staging/rtl8192u/r8192U.h typedef struct _phy_cck_rx_status_report_819xusb { · line 796
Quoted 5 lines
drivers/staging/rtl8192u/r8192U.h +1
-1@@ -793,12 +793,12 @@ typedef struct _phy_cck_rx_status_report_819xusb { } phy_sts_cck_819xusb_t; -typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag { +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {
You should drop the _ at the beginning of the name. The _ suggests that he name is a hidden thing, because one was intended to use the typedef. The is not the case any more, so it would be better to drop the _.
The name of the structure seems to be sort of a concatenation of the names of the fields. If you can think of a better name based on how the structure is used, that could be good to.
julia
Quoted 41 lines
drivers/staging/rtl8192u/r8192U.h +1
-1u8 reserved:4; u8 rxsc:2; u8 sgi_en:1; u8 ex_intf_flag:1; -} phy_ofdm_rx_status_rxsc_sgien_exintfflag; +}; typedef enum _RT_CUSTOMER_ID { RT_CID_DEFAULT = 0,drivers/staging/rtl8192u/r8192U_core.c +2
-3@@ -4242,7 +4242,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, {phy_sts_ofdm_819xusb_t *pofdm_buf;phy_sts_cck_819xusb_t *pcck_buf; -phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc; +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;u8 *prxpkt;u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;s8 rx_pwr[4 ], rx_pwr_all =0 ;@@ -4432,7 +4432,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,/* record rx statistics for debug */ rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; - prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *) + prxsc = (struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *) &rxsc_sgien_exflg;if (pdrvinfo->BW)/* 40M channel */ priv->stats.received_bwtype[1 + prxsc->rxsc]++; --2.7.4
--
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/20170311162045.GA21103%40singhal-Inspiron-5558.
For more options, visit https://groups.google.com/d/optout.
Quoted 28 lines · Julia Lawall
Quoted 14 lines · simran singhal
Remove typdef
phy_ofdm_rx_status_rxsc_sgien_exintfflagand replace its uses in the code.Signed-off-by simran singhal <[email protected]>--- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8192u/r8192U.h +0
-0drivers/staging/rtl8192u/r8192U.h typedef struct _phy_cck_rx_status_report_819xusb { · line 796
Quoted 5 lines
drivers/staging/rtl8192u/r8192U.h +1
-1@@ -793,12 +793,12 @@ typedef struct _phy_cck_rx_status_report_819xusb { } phy_sts_cck_819xusb_t; -typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag { +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {You should drop the _ at the beginning of the name. The _ suggests that he name is a hidden thing, because one was intended to use the typedef. The is not the case any more, so it would be better to drop the _.
Quoted 4 lines
The name of the structure seems to be sort of a concatenation of the names of the fields. If you can think of a better name based on how the structure is used, that could be good to.
Juila, I think changing the name of the structure is not a good idea as other structures are also given on the basis of concatenation of the names of the fields.
So, it will break the consistency.
And I will resend this patch with droping "_" at the beginning.
Quoted 43 lines
julia
Quoted 41 lines
drivers/staging/rtl8192u/r8192U.h +1
-1u8 reserved:4; u8 rxsc:2; u8 sgi_en:1; u8 ex_intf_flag:1; -} phy_ofdm_rx_status_rxsc_sgien_exintfflag; +}; typedef enum _RT_CUSTOMER_ID { RT_CID_DEFAULT = 0,drivers/staging/rtl8192u/r8192U_core.c +2
-3@@ -4242,7 +4242,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, {phy_sts_ofdm_819xusb_t *pofdm_buf;phy_sts_cck_819xusb_t *pcck_buf; -phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc; +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;u8 *prxpkt;u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;s8 rx_pwr[4 ], rx_pwr_all =0 ;@@ -4432,7 +4432,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,/* record rx statistics for debug */ rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; - prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *) + prxsc = (struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *) &rxsc_sgien_exflg;if (pdrvinfo->BW)/* 40M channel */ priv->stats.received_bwtype[1 + prxsc->rxsc]++; --2.7.4
--
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/20170311162045.GA21103%40singhal-Inspiron-5558.
For more options, visit https://groups.google.com/d/optout.
Quoted 29 lines · SIMRAN SINGHAL
Quoted 28 lines · Julia Lawall
Quoted 14 lines · simran singhal
Remove typdef
phy_ofdm_rx_status_rxsc_sgien_exintfflagand replace its uses in the code.Signed-off-by simran singhal <[email protected]>--- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/rtl8192u/r8192U.h +0
-0drivers/staging/rtl8192u/r8192U.h typedef struct _phy_cck_rx_status_report_819xusb { · line 796
Quoted 5 lines
drivers/staging/rtl8192u/r8192U.h +1
-1@@ -793,12 +793,12 @@ typedef struct _phy_cck_rx_status_report_819xusb { } phy_sts_cck_819xusb_t; -typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag { +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {You should drop the _ at the beginning of the name. The _ suggests that he name is a hidden thing, because one was intended to use the typedef. The is not the case any more, so it would be better to drop the _.
Quoted 8 lines
Quoted 4 lines
The name of the structure seems to be sort of a concatenation of the names of the fields. If you can think of a better name based on how the structure is used, that could be good to.
Juila, I think changing the name of the structure is not a good idea as other structures are also given on the basis of concatenation of the names of the fields.
So, it will break the consistency.
I think that the name (or rather all the names) will have to be changed eventually. It's impractical and unmeaningful. But perhaps it woud be too much for this patch, so it's fine to just drop the _.
julia
Quoted 55 lines
And I will resend this patch with droping "_" at the beginning.
Quoted 36 lines
julia
Quoted 34 lines
drivers/staging/rtl8192u/r8192U.h +1
-1u8 reserved:4; u8 rxsc:2; u8 sgi_en:1; u8 ex_intf_flag:1; -} phy_ofdm_rx_status_rxsc_sgien_exintfflag; +}; typedef enum _RT_CUSTOMER_ID { RT_CID_DEFAULT = 0,drivers/staging/rtl8192u/r8192U_core.c +2
-3@@ -4242,7 +4242,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, {phy_sts_ofdm_819xusb_t *pofdm_buf;phy_sts_cck_819xusb_t *pcck_buf; -phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc; +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;u8 *prxpkt;u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;s8 rx_pwr[4 ], rx_pwr_all =0 ;@@ -4432,7 +4432,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,/* record rx statistics for debug */ rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; - prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *) + prxsc = (struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *) &rxsc_sgien_exflg;if (pdrvinfo->BW)/* 40M channel */ priv->stats.received_bwtype[1 + prxsc->rxsc]++; --2.7.4
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/20170311162045.GA21103%40singhal-Inspiron-5558.
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/CALrZqyMFOVzDNWABBP2oTN5q7_H7vABWFb5LBt96teurvNQVVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.