* [PATCH] btrfs: remove unused pointer inode
@ 2018-08-28 10:45 Colin King
2018-09-06 15:59 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-08-28 10:45 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, linux-btrfs
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer inode is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
variable ‘inode’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/btrfs/inode.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c32ca4ca3540..b6921ed5c07b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2750,12 +2750,9 @@ static void relink_file_extents(struct new_sa_defrag_extent *new)
struct btrfs_path *path;
struct sa_defrag_extent_backref *backref;
struct sa_defrag_extent_backref *prev = NULL;
- struct inode *inode;
struct rb_node *node;
int ret;
- inode = new->inode;
-
path = btrfs_alloc_path();
if (!path)
return;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs: remove unused pointer inode
2018-08-28 10:45 [PATCH] btrfs: remove unused pointer inode Colin King
@ 2018-09-06 15:59 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-09-06 15:59 UTC (permalink / raw)
To: Colin King
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs,
kernel-janitors, linux-kernel
On Tue, Aug 28, 2018 at 11:45:21AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer inode is being assigned but is never used hence it is
> redundant and can be removed.
>
> Cleans up clang warning:
> variable ‘inode’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-06 16:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 10:45 [PATCH] btrfs: remove unused pointer inode Colin King
2018-09-06 15:59 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).