]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: better handle btrfs_printk() defaults
authorPetr Mladek <pmladek@suse.com>
Wed, 14 Dec 2016 23:04:01 +0000 (15:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 00:04:07 +0000 (16:04 -0800)
commit1831c69d66310d3553b147bfda30baf7b253e0cb
tree886d664a7ea0a22f87013bb83c4c12e51611b72e
parentf62f38313fb8be6e74927529998f1597d5eb96b5
btrfs: better handle btrfs_printk() defaults

Commit 24eb81de9eaa ("printk/btrfs: handle more message headers")
triggers:

    warning: `ratelimit' may be used uninitialized in this function

with gcc (4.1.2) and probably many other versions.  The code actually is
correct but a bit twisted.  Let's make it more straightforward and set
the default values at the beginning.

Link: http://lkml.kernel.org/r/20161213135246.GQ3506@pathway.suse.cz
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/btrfs/super.c