diff mbox

[OPW,kernel] staging:rtl8187se:ieee80211:dot11d.h: remove typdef struct _CHNL_TXPOWER_TRIPLE

Message ID 20131103131634.GA5321@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI Nov. 3, 2013, 1:16 p.m. UTC
This patch removes the checkpatch.pl warning "do not add new typedefs"
by removing the typedef and changing the source files that use the
structure CHNL_TXPOWER_TRIPLE or a pointer to it.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/dot11d.c |    6 +++---
 drivers/staging/rtl8187se/ieee80211/dot11d.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Josh Triplett Nov. 3, 2013, 6:24 p.m. UTC | #1
On Sun, Nov 03, 2013 at 06:46:34PM +0530, Himangi Saraogi wrote:
> This patch removes the checkpatch.pl warning "do not add new typedefs"
> by removing the typedef and changing the source files that use the
> structure CHNL_TXPOWER_TRIPLE or a pointer to it.
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  drivers/staging/rtl8187se/ieee80211/dot11d.c |    6 +++---
>  drivers/staging/rtl8187se/ieee80211/dot11d.h |    4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> index 9d2d5c5..6327b6e 100644
> --- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
> +++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
> @@ -74,7 +74,7 @@ Dot11d_UpdateCountryIe(
>  {
>  	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
>  	u8 i, j, NumTriples, MaxChnlNum;
> -	PCHNL_TXPOWER_TRIPLE pTriple;
> +	struct CHNL_TXPOWER_TRIPLE *pTriple;
>  
>  	if ((CoutryIeLen - 3)%3 != 0) {
>  		printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
> @@ -86,7 +86,7 @@ Dot11d_UpdateCountryIe(
>  	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
>  	MaxChnlNum = 0;
>  	NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.
> -	pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
> +	pTriple = (struct CHNL_TXPOWER_TRIPLE *)(pCoutryIe + 3);
>  	for (i = 0; i < NumTriples; i++) {
>  		if (MaxChnlNum >= pTriple->FirstChnl) {
>  		// It is not in a monotonically increasing order, so stop processing.
> @@ -107,7 +107,7 @@ Dot11d_UpdateCountryIe(
>  			MaxChnlNum = pTriple->FirstChnl + j;
>  		}
>  
> -		pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
> +		pTriple = (struct CHNL_TXPOWER_TRIPLE *)((u8 *)pTriple + 3);
>  	}
>  #if 1
>  	//printk("Dot11d_UpdateCountryIe(): Channel List:\n");
> diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.h b/drivers/staging/rtl8187se/ieee80211/dot11d.h
> index 9c016fe..3bca484 100644
> --- a/drivers/staging/rtl8187se/ieee80211/dot11d.h
> +++ b/drivers/staging/rtl8187se/ieee80211/dot11d.h
> @@ -7,11 +7,11 @@
>  
>  /* #define DOT11D_MAX_CHNL_NUM 83 */
>  
> -typedef struct _CHNL_TXPOWER_TRIPLE {
> +struct CHNL_TXPOWER_TRIPLE {
>  	u8 FirstChnl;
>  	u8  NumChnls;
>  	u8  MaxTxPowerInDbm;
> -}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
> +};
>  
>  typedef enum _DOT11D_STATE {
>  	DOT11D_STATE_NONE = 0,
> -- 
> 1.7.9.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Greg Kroah-Hartman Nov. 10, 2013, 4:48 p.m. UTC | #2
On Sun, Nov 03, 2013 at 06:46:34PM +0530, Himangi Saraogi wrote:
> This patch removes the checkpatch.pl warning "do not add new typedefs"
> by removing the typedef and changing the source files that use the
> structure CHNL_TXPOWER_TRIPLE or a pointer to it.
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>

This patch totally fails to apply to my tree, can you please resync and
try it again against the opw-branch of my staging.git tree?

thanks,

greg k-h
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.c b/drivers/staging/rtl8187se/ieee80211/dot11d.c
index 9d2d5c5..6327b6e 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.c
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.c
@@ -74,7 +74,7 @@  Dot11d_UpdateCountryIe(
 {
 	PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
 	u8 i, j, NumTriples, MaxChnlNum;
-	PCHNL_TXPOWER_TRIPLE pTriple;
+	struct CHNL_TXPOWER_TRIPLE *pTriple;
 
 	if ((CoutryIeLen - 3)%3 != 0) {
 		printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
@@ -86,7 +86,7 @@  Dot11d_UpdateCountryIe(
 	memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
 	MaxChnlNum = 0;
 	NumTriples = (CoutryIeLen - 3) / 3; // skip 3-byte country string.
-	pTriple = (PCHNL_TXPOWER_TRIPLE)(pCoutryIe + 3);
+	pTriple = (struct CHNL_TXPOWER_TRIPLE *)(pCoutryIe + 3);
 	for (i = 0; i < NumTriples; i++) {
 		if (MaxChnlNum >= pTriple->FirstChnl) {
 		// It is not in a monotonically increasing order, so stop processing.
@@ -107,7 +107,7 @@  Dot11d_UpdateCountryIe(
 			MaxChnlNum = pTriple->FirstChnl + j;
 		}
 
-		pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
+		pTriple = (struct CHNL_TXPOWER_TRIPLE *)((u8 *)pTriple + 3);
 	}
 #if 1
 	//printk("Dot11d_UpdateCountryIe(): Channel List:\n");
diff --git a/drivers/staging/rtl8187se/ieee80211/dot11d.h b/drivers/staging/rtl8187se/ieee80211/dot11d.h
index 9c016fe..3bca484 100644
--- a/drivers/staging/rtl8187se/ieee80211/dot11d.h
+++ b/drivers/staging/rtl8187se/ieee80211/dot11d.h
@@ -7,11 +7,11 @@ 
 
 /* #define DOT11D_MAX_CHNL_NUM 83 */
 
-typedef struct _CHNL_TXPOWER_TRIPLE {
+struct CHNL_TXPOWER_TRIPLE {
 	u8 FirstChnl;
 	u8  NumChnls;
 	u8  MaxTxPowerInDbm;
-}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
+};
 
 typedef enum _DOT11D_STATE {
 	DOT11D_STATE_NONE = 0,