All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: YueHaibing <yuehaibing@huawei.com>, David Sterba <dsterba@suse.com>
Subject: Re: [PATCH -next] btrfs: remove set but not used variable 'num_pages'
Date: Mon, 17 Dec 2018 11:02:09 +0800	[thread overview]
Message-ID: <477d62ef-0881-631a-6b18-02c5756da8ce@oracle.com> (raw)
In-Reply-To: <1544855467-154115-1-git-send-email-yuehaibing@huawei.com>


(cc-list-updated)

On 12/15/2018 02:31 PM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/btrfs/ioctl.c: In function 'btrfs_extent_same':
> fs/btrfs/ioctl.c:3260:6: warning:
>   variable 'num_pages' set but not used [-Wunused-but-set-variable]
> 
> It not used any more since commit 9ee8234e6220 ("Btrfs: use
> generic_remap_file_range_prep() for cloning and deduplication")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

This can be rolled up to 9ee8234e6220.

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


> ---
>   fs/btrfs/ioctl.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index fab9443..15fc467 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -3257,7 +3257,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
>   			     struct inode *dst, u64 dst_loff)
>   {
>   	int ret;
> -	int num_pages = PAGE_ALIGN(BTRFS_MAX_DEDUPE_LEN) >> PAGE_SHIFT;
>   	u64 i, tail_len, chunk_count;
>   
>   	/* don't make the dst file partly checksummed */
> @@ -3270,8 +3269,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
>   
>   	tail_len = olen % BTRFS_MAX_DEDUPE_LEN;
>   	chunk_count = div_u64(olen, BTRFS_MAX_DEDUPE_LEN);
> -	if (chunk_count == 0)
> -		num_pages = PAGE_ALIGN(tail_len) >> PAGE_SHIFT;
>   
>   	for (i = 0; i < chunk_count; i++) {
>   		ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,
> 
> 
> 

  reply	other threads:[~2018-12-17  3:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15  6:31 [PATCH -next] btrfs: remove set but not used variable 'num_pages' YueHaibing
2018-12-15  6:31 ` YueHaibing
2018-12-17  3:02 ` Anand Jain [this message]
2019-01-04 15:51 ` David Sterba
2019-01-04 15:51   ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2019-04-18  6:43 [PATCH -next] btrfs: Remove set but not used variable 'fs_info' YueHaibing
2019-04-18  6:43 ` YueHaibing
2019-04-18  6:37 ` Nikolay Borisov
2019-04-18  6:37   ` Nikolay Borisov
2019-04-18  7:34   ` YueHaibing
2019-04-18  7:34     ` YueHaibing
2019-04-18 13:43 ` David Sterba
2019-04-18 13:43   ` David Sterba
2019-03-27  3:20 [PATCH -next] btrfs: remove set but not used variable 'fs_devices' YueHaibing
2019-03-27  3:20 ` YueHaibing
2019-03-28 14:27 ` David Sterba
2019-03-28 14:27   ` David Sterba
2018-11-08  2:14 [PATCH -next] btrfs: remove set but not used variable 'tree' YueHaibing
2018-11-08  2:14 ` YueHaibing
2018-11-08  6:53 ` Nikolay Borisov
2018-11-08  6:53   ` Nikolay Borisov
2018-11-08 12:11 ` David Sterba
2018-11-08 12:11   ` 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=477d62ef-0881-631a-6b18-02c5756da8ce@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --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 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.