• Himangi Saraogi's avatar
    wan: wanxl: Remove typedefs from struct names · db569581
    Himangi Saraogi authored
    The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedefs for
    port_t, card_status_t and card_t. Also, the names of the structs
    are changed to drop the _t, to make the name look less typedef-like.
    
    The following Coccinelle semantic patch detects two cases and a
    similar one detects the case for card_t.
    
    @tn1@
    type td;
    @@
    
    typedef struct { ... } td;
    
    @script:python tf@
    td << tn1.td;
    tdres;
    @@
    
    coccinelle.tdres = td;
    
    @@
    type tn1.td;
    identifier tf.tdres;
    @@
    
    -typedef
     struct
    +  tdres
       { ... }
    -td
     ;
    
    @@
    type tn1.td;
    identifier tf.tdres;
    @@
    
    -td
    + struct tdres
    Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
    Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    db569581
wanxl.c 20.8 KB