All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: jeffm@suse.com
Cc: linux-btrfs@vger.kernel.org, David Sterba <dsterba@suse.com>
Subject: Re: [PATCH 4/5] btrfs: convert pr_* to btrfs_* where possible
Date: Wed, 21 Sep 2016 17:36:58 +0200	[thread overview]
Message-ID: <20160921153658.GK16983@twin.jikos.cz> (raw)
In-Reply-To: <1474380303-25995-5-git-send-email-jeffm@suse.com>

On Tue, Sep 20, 2016 at 10:05:02AM -0400, jeffm@suse.com wrote:
>  static struct btrfs_block_group_cache *
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 6fdc701..c9bb727 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -2186,6 +2187,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end)
>  int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
>  		struct io_failure_record **failrec_ret)
>  {
> +	struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);

I get a compiler warning:

fs/btrfs/extent_io.c: In function 'btrfs_get_io_failure_record':
fs/btrfs/extent_io.c:2191:24: warning: unused variable 'fs_info' [-Wunused-variable]

as btrfs_debug is compiled out. The following diff silences the warning for me:

--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2188,7 +2188,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end)
 int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
                struct io_failure_record **failrec_ret)
 {
-       struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
+       struct btrfs_fs_info *fs_info;
        struct io_failure_record *failrec;
        struct extent_map *em;
        struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
@@ -2197,6 +2197,8 @@ int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
        int ret;
        u64 logical;

+       fs_info = btrfs_sb(inode->i_sb);
+
        ret = get_state_failrec(failure_tree, start, &failrec);
        if (ret) {
                failrec = kzalloc(sizeof(*failrec), GFP_NOFS);
---

so to keep the build clean we might need to do some more tweaks. I'll look if I
can kill the warning quickly, the remaing are

fs/btrfs/send.c: In function 'send_rename':
fs/btrfs/send.c:726:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_link':
fs/btrfs/send.c:751:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_unlink':
fs/btrfs/send.c:775:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_rmdir':
fs/btrfs/send.c:798:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_truncate':
fs/btrfs/send.c:2425:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_chmod':
fs/btrfs/send.c:2455:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_chown':
fs/btrfs/send.c:2485:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_utimes':
fs/btrfs/send.c:2517:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_create_inode':
fs/btrfs/send.c:2580:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'process_recorded_refs':
fs/btrfs/send.c:3646:24: warning: unused variable 'fs_info' [-Wunused-variable]
fs/btrfs/send.c: In function 'send_write':
fs/btrfs/send.c:4669:24: warning: unused variable 'fs_info' [-Wunused-variable]

  reply	other threads:[~2016-09-21 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 14:04 [PATCH 0/5] btrfs: printing cleanup patchset jeffm
2016-09-20 14:04 ` [PATCH 1/5] btrfs: add dynamic debug support jeffm
2016-09-20 14:05 ` [PATCH 2/5] btrfs: unsplit printed strings jeffm
2016-09-20 14:05 ` [PATCH 3/5] btrfs: convert printk(KERN_* to use pr_* calls jeffm
2016-09-20 14:05 ` [PATCH 4/5] btrfs: convert pr_* to btrfs_* where possible jeffm
2016-09-21 15:36   ` David Sterba [this message]
2016-09-23 12:37   ` David Sterba
2016-09-20 14:05 ` [PATCH 5/5] btrfs: convert send's verbose_printk to btrfs_debug jeffm
2016-09-21 15:43 ` [PATCH] btrfs: silence compiler warning when fs_info is not used David Sterba
2016-09-21 15:47   ` Jeff Mahoney
2016-09-21 16:16     ` Jeff Mahoney
2016-09-21 15:46 ` [PATCH 0/5] btrfs: printing cleanup patchset David Sterba
2016-09-21 16:17 ` [PATCH] btrfs: btrfs_debug should consume fs_info when DEBUG is not defined Jeff Mahoney
2016-09-22 14:43   ` David Sterba

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=20160921153658.GK16983@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=jeffm@suse.com \
    --cc=linux-btrfs@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.