mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: nborisov@suse.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] btrfs: remove set but not used variable 'offset'
Date: Wed, 3 Jul 2019 11:51:41 +0800	[thread overview]
Message-ID: <98cd6f89-80f2-ee2c-aa07-6e06e424e79f@oracle.com> (raw)
In-Reply-To: <20190702141521.48932-1-yuehaibing@huawei.com>

On 2/7/19 10:15 PM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/btrfs/volumes.c: In function __btrfs_map_block:
> fs/btrfs/volumes.c:6023:6: warning:
>   variable offset set but not used [-Wunused-but-set-variable]
> 
> It is not used any more since commit 343abd1c0ca9 ("btrfs: Use
> btrfs_get_io_geometry appropriately")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>


Reviewed-by: Anand Jain <anand.jain@oracle.com>


> ---
>   fs/btrfs/volumes.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index d1fd910..5d5a9ff 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -6020,7 +6020,6 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
>   {
>   	struct extent_map *em;
>   	struct map_lookup *map;
> -	u64 offset;
>   	u64 stripe_offset;
>   	u64 stripe_nr;
>   	u64 stripe_len;
> @@ -6055,7 +6054,6 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info,
>   	map = em->map_lookup;
>   
>   	*length = geom.len;
> -	offset = geom.offset;
>   	stripe_len = geom.stripe_len;
>   	stripe_nr = geom.stripe_nr;
>   	stripe_offset = geom.stripe_offset;
> 


  reply	other threads:[~2019-07-03  3:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 14:15 YueHaibing
2019-07-03  3:51 ` Anand Jain [this message]
2019-07-17 15:04 ` 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=98cd6f89-80f2-ee2c-aa07-6e06e424e79f@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=yuehaibing@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®