• Josef Bacik's avatar
    btrfs: remove unused function prototypes · 911bd75a
    Josef Bacik authored
    I wrote the following coccinelle script to find function declarations
    that didn't have the corresponding code for them
    
    @funcproto@
    identifier func;
    type T;
    position p0;
    @@
    
    T func@p0(...);
    
    @funccode@
    identifier funcproto.func;
    position p1;
    @@
    
    func@p1(...) { ... }
    
    @script:python depends on !funccode@
    p0 << funcproto.p0;
    @@
    print("Proto with no function at %s:%s" % (p0[0].file, p0[0].line))
    
    and ran it against btrfs, which identified the 4 function prototypes
    I've removed in this patch.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    911bd75a
ctree.h 39.8 KB