Message ID | 1544855467-154115-1-git-send-email-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] btrfs: remove set but not used variable 'num_pages' | expand |
(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, > > >
On Sat, Dec 15, 2018 at 06:31:07AM +0000, 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> Added to patch queue, thanks.
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,
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> --- fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-)