]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: btrfs_debug should consume fs_info when DEBUG is not defined
authorJeff Mahoney <jeffm@suse.com>
Wed, 21 Sep 2016 16:17:37 +0000 (12:17 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2016 17:37:06 +0000 (19:37 +0200)
commit7589cd32ac2ed79874be0bb5acd73ec037bbe209
treec7620ef5a210b8304e46a514d42b84036fad44b2
parentfe49338c27e07c0efbe9bc81f0b1baf6e073300f
btrfs: btrfs_debug should consume fs_info when DEBUG is not defined

We can hit unused variable warnings when btrfs_debug and friends are
just aliases for no_printk.  This is due to the fs_info not getting
consumed by the function call, which can happen if convenenience
variables are used.  This patch adds a new btrfs_no_printk static inline
that consumes the convenience variable and does nothing else.  It
silences the unused variable warning and has no impact on the generated
code:

$ size fs/btrfs/extent_io.o*
   text    data     bss     dec     hex filename
  44072     152      32   44256    ace0 fs/btrfs/extent_io.o.btrfs_no_printk
  44072     152      32   44256    ace0 fs/btrfs/extent_io.o.no_printk

Fixes: 494b7d9dc4 (Btrfs: make btrfs_debug match pr_debug handling related to DEBUG)
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h