staging: rtl8192u: Remove typedef for struct.
authorSanjana Sanikommu <sanjana99reddy99@gmail.com>
Tue, 26 Mar 2019 17:09:42 +0000 (22:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 14:33:27 +0000 (23:33 +0900)
Challenge suggested by coccinelle.

Linux kernel coding style guidelines suggest not using typedefs for
structure.
The following Coccinelle semantic patch detects the cases for struct
type:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211.h

index ad5a3ae148041b84b6a6831f0761a72336c563c5..638cad6df1c43d734de5531c670d9dfb50640f2f 100644 (file)
@@ -296,7 +296,7 @@ struct cb_desc {
 #define ieee80211_wx_get_encode_ext    ieee80211_wx_get_encode_ext_rsl
 
 
-typedef struct ieee_param {
+struct ieee_param {
        u32 cmd;
        u8 sta_addr[ETH_ALEN];
        union {
@@ -323,7 +323,7 @@ typedef struct ieee_param {
                        u8 key[0];
                } crypt;
        } u;
-} ieee_param;
+};
 
 
 // linux under 2.6.9 release may not support it, so modify it for common use