All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/3] fs/ocfs2/file.c: remove set but not used variables
Date: Fri, 23 Aug 2019 09:09:47 +0800	[thread overview]
Message-ID: <1566522588-63786-3-git-send-email-joseph.qi@linux.alibaba.com> (raw)
In-Reply-To: <1566522588-63786-1-git-send-email-joseph.qi@linux.alibaba.com>

From: zhengbin <zhengbin13@huawei.com>

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]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Changwei Ge <chge@linux.alibaba.com>
---
 fs/ocfs2/file.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index efe9988..2e982db 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2130,7 +2130,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
@@ -2194,8 +2193,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);
-- 
1.8.3.1

  parent reply	other threads:[~2019-08-23  1:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23  1:09 [Ocfs2-devel] [PATCH 0/3 RESEND] fs/ocfs2: remove set but not used variables Joseph Qi
2019-08-23  1:09 ` [Ocfs2-devel] [PATCH 1/3] fs/ocfs2/namei.c: " Joseph Qi
2019-08-24 20:50   ` Andrew Morton
2019-08-23  1:09 ` Joseph Qi [this message]
2019-08-23  1:09 ` [Ocfs2-devel] [PATCH 3/3] fs/ocfs2/dir.c: " Joseph Qi
     [not found] <1566393326-25371-1-git-send-email-zhengbin13@huawei.com>
     [not found] ` <1566393326-25371-3-git-send-email-zhengbin13@huawei.com>
2019-08-22  1:07   ` [Ocfs2-devel] [PATCH 2/3] fs/ocfs2/file.c: " Joseph Qi
2019-08-22  6:00     ` Changwei Ge

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=1566522588-63786-3-git-send-email-joseph.qi@linux.alibaba.com \
    --to=joseph.qi@linux.alibaba.com \
    --cc=ocfs2-devel@oss.oracle.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.