linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ocfs2: remove set but not used variable 'end'
@ 2018-11-10  7:21 YueHaibing
  0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2018-11-10  7:21 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker
  Cc: YueHaibing, ocfs2-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

fs/ocfs2/file.c: In function 'ocfs2_prepare_inode_for_write':
fs/ocfs2/file.c:2143:9: warning:
 variable 'end' set but not used [-Wunused-but-set-variable]

It not used any more after commit
f1f973ffce96 ("ocfs2: code clean up for direct io")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/ocfs2/file.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index d640c5f..1905ead 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2140,7 +2140,6 @@ static int ocfs2_prepare_inode_for_write(struct file *file,
 	struct dentry *dentry = file->f_path.dentry;
 	struct inode *inode = d_inode(dentry);
 	struct buffer_head *di_bh = NULL;
-	loff_t end;
 
 	/*
 	 * We start with a read level meta lock and only jump to an ex
@@ -2204,8 +2203,6 @@ static int ocfs2_prepare_inode_for_write(struct file *file,
 			}
 		}
 
-		end = pos + count;
-
 		ret = ocfs2_check_range_for_refcount(inode, pos, count);
 		if (ret == 1) {
 			ocfs2_inode_unlock(inode, meta_level);




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-10  7:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10  7:21 [PATCH -next] ocfs2: remove set but not used variable 'end' YueHaibing

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).