From: Arnd Bergmann <arnd@arndb.de> To: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>, linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nilfs: avoid warning about unused variables Date: Wed, 15 Jun 2016 22:19:41 +0200 Message-ID: <20160615201945.3348205-1-arnd@arndb.de> (raw) The newly added nilfs_msg() infrastructure caused a warning in nilfs_clear_dirty_page() when it is disabled: fs/nilfs2/page.c: In function 'nilfs_clear_dirty_page': fs/nilfs2/page.c:402:22: error: unused variable 'sb' [-Werror=unused-variable] struct super_block *sb = inode->i_sb; We can avoid the warning by adding a cast to void for the first argument of the macro. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: aede53d223f0 ("nilfs2: replace nilfs_warning() with nilfs_msg()") --- fs/nilfs2/nilfs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index b7064faef217..46fbd4e00315 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h @@ -317,7 +317,10 @@ void __nilfs_error(struct super_block *sb, const char *function, #else #define nilfs_msg(sb, level, fmt, ...) \ - no_printk(fmt, ##__VA_ARGS__) + do { \ + no_printk(fmt, ##__VA_ARGS__); \ + (void)(sb); \ + } while (0) #define nilfs_error(sb, fmt, ...) \ do { \ no_printk(fmt, ##__VA_ARGS__); \ -- 2.9.0
next reply index Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-15 20:19 Arnd Bergmann [this message] 2016-06-15 22:05 ` Ryusuke Konishi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160615201945.3348205-1-arnd@arndb.de \ --to=arnd@arndb.de \ --cc=akpm@linux-foundation.org \ --cc=konishi.ryusuke@lab.ntt.co.jp \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nilfs@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git