• Himangi Saraogi's avatar
    hdlc: Remove typedefs from struct names · 3fadb06d
    Himangi Saraogi authored
    The Linux kernel coding style guidelines suggest not using typedefs
    for structure types. This patch gets rid of the typedefs for
    fr_hdr and pvc_device. 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 the case fr_hdr and a
    similar one detects the case for pvc_device.
    
    @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>
    3fadb06d
hdlc_fr.c 29.4 KB