Staging: rtl8192u: Do not add new typedefs
authorCristina Opriceana <cristina.opriceana@gmail.com>
Mon, 16 Mar 2015 19:55:15 +0000 (21:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 09:32:39 +0000 (10:32 +0100)
This patch removes the dig_t and DRxPathSel type definitions in order to
avoid the following warning: "WARNING: Do not add new typedefs".
Done with coccinelle and this script:

@r@ type t; identifier id; @@
typedef struct id
{...}
t;

@script:python get_name@
t << r.t;
tdres;
@@
coccinelle.tdres = t.replace("_t", "");

@r_match@ type r.t; identifier r.id;
identifier get_name.tdres; @@
-typedef
struct
-id
+tdres
{...}
-t
;
@r_replace@ type r.t; identifier get_name.tdres; @@
-t
+struct tdres

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_dm.c
drivers/staging/rtl8192u/r8192U_dm.h

index 8669162a4a7d1360b1994d8da8447e33e76a9c06..402abdfc7ac50695532a1857bd520fb346f8a7bc 100644 (file)
@@ -36,11 +36,12 @@ static u32 edca_setting_UL[HT_IOT_PEER_MAX] = {
 
 /*------------------------Define global variable-----------------------------*/
 /* Debug variable ? */
-dig_t  dm_digtable;
+struct dig dm_digtable;
 /* Store current software write register content for MAC PHY. */
 u8             dm_shadow[16][256] = { {0} };
 /* For Dynamic Rx Path Selection by Signal Strength */
-DRxPathSel     DM_RxPathSelTable;
+struct DRxPathSel DM_RxPathSelTable;
+
 /*------------------------Define global variable-----------------------------*/
 
 
index 3008f91ad4cf11d352fc8e8b685c42a78e40550a..091fdd1c1ff96361b5b41d9b63c277dc07e6bb35 100644 (file)
@@ -67,7 +67,7 @@
 
 /*------------------------------Define structure----------------------------*/
 /* 2007/10/04 MH Define upper and lower threshold of DIG enable or disable. */
-typedef struct _dynamic_initial_gain_threshold_ {
+struct dig {
        u8              dig_enable_flag;
        u8              dig_algorithm;
        u8              dbg_mode;
@@ -98,7 +98,7 @@ typedef struct _dynamic_initial_gain_threshold_ {
        bool            initialgain_lowerbound_state;
 
        long            rssi_val;
-} dig_t;
+};
 
 typedef enum tag_dynamic_init_gain_state_definition {
        DM_STA_DIG_OFF = 0,
@@ -163,7 +163,7 @@ typedef enum tag_dig_cck_cs_ratio_state_definition {
        DIG_CS_RATIO_HIGHER = 1,
        DIG_CS_MAX
 } dm_dig_cs_ratio_e;
-typedef struct _Dynamic_Rx_Path_Selection_ {
+struct DRxPathSel {
        u8              Enable;
        u8              DbgMode;
        u8              cck_method;
@@ -177,7 +177,7 @@ typedef struct _Dynamic_Rx_Path_Selection_ {
        u8              rf_rssi[4];
        u8              rf_enable_rssi_th[4];
        long            cck_pwdb_sta[4];
-} DRxPathSel;
+};
 
 typedef enum tag_CCK_Rx_Path_Method_Definition {
        CCK_Rx_Version_1 = 0,
@@ -200,9 +200,9 @@ typedef struct tag_Tx_Config_Cmd_Format {
 
 
 /*------------------------Export global variable----------------------------*/
-extern dig_t dm_digtable;
+extern struct dig dm_digtable;
 extern u8 dm_shadow[16][256];
-extern DRxPathSel DM_RxPathSelTable;
+extern struct DRxPathSel DM_RxPathSelTable;
 /*------------------------Export global variable----------------------------*/
 
 
This page took 0.028177 seconds and 5 git commands to generate.