linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ocfs2: dlmfs: remove set but not used variable 'status'
@ 2018-10-23 13:09 zhong jiang
  2018-10-24  0:57 ` piaojun
  2018-10-24 10:37 ` Joseph Qi
  0 siblings, 2 replies; 3+ messages in thread
From: zhong jiang @ 2018-10-23 13:09 UTC (permalink / raw)
  To: akpm, mark, jlbec
  Cc: jiangqi903, dhowells, piaojun, viro, ocfs2-devel, linux-kernel

status is not used after setting its value. It is safe to remove
the unused variable.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 fs/ocfs2/dlmfs/dlmfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index 642e471..b03dd46 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -179,7 +179,7 @@ static int dlmfs_file_open(struct inode *inode,
 static int dlmfs_file_release(struct inode *inode,
 			      struct file *file)
 {
-	int level, status;
+	int level;
 	struct dlmfs_inode_private *ip = DLMFS_I(inode);
 	struct dlmfs_filp_private *fp = file->private_data;
 
@@ -188,7 +188,6 @@ static int dlmfs_file_release(struct inode *inode,
 
 	mlog(0, "close called on inode %lu\n", inode->i_ino);
 
-	status = 0;
 	if (fp) {
 		level = fp->fp_lock_level;
 		if (level != DLM_LOCK_IV)
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ocfs2: dlmfs: remove set but not used variable 'status'
  2018-10-23 13:09 [PATCH] ocfs2: dlmfs: remove set but not used variable 'status' zhong jiang
@ 2018-10-24  0:57 ` piaojun
  2018-10-24 10:37 ` Joseph Qi
  1 sibling, 0 replies; 3+ messages in thread
From: piaojun @ 2018-10-24  0:57 UTC (permalink / raw)
  To: zhong jiang, akpm, mark, jlbec
  Cc: jiangqi903, dhowells, viro, ocfs2-devel, linux-kernel

LGTM

On 2018/10/23 21:09, zhong jiang wrote:
> status is not used after setting its value. It is safe to remove
> the unused variable.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Jun Piao <piaojun@huawei.com>
> ---
>  fs/ocfs2/dlmfs/dlmfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
> index 642e471..b03dd46 100644
> --- a/fs/ocfs2/dlmfs/dlmfs.c
> +++ b/fs/ocfs2/dlmfs/dlmfs.c
> @@ -179,7 +179,7 @@ static int dlmfs_file_open(struct inode *inode,
>  static int dlmfs_file_release(struct inode *inode,
>  			      struct file *file)
>  {
> -	int level, status;
> +	int level;
>  	struct dlmfs_inode_private *ip = DLMFS_I(inode);
>  	struct dlmfs_filp_private *fp = file->private_data;
>  
> @@ -188,7 +188,6 @@ static int dlmfs_file_release(struct inode *inode,
>  
>  	mlog(0, "close called on inode %lu\n", inode->i_ino);
>  
> -	status = 0;
>  	if (fp) {
>  		level = fp->fp_lock_level;
>  		if (level != DLM_LOCK_IV)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ocfs2: dlmfs: remove set but not used variable 'status'
  2018-10-23 13:09 [PATCH] ocfs2: dlmfs: remove set but not used variable 'status' zhong jiang
  2018-10-24  0:57 ` piaojun
@ 2018-10-24 10:37 ` Joseph Qi
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph Qi @ 2018-10-24 10:37 UTC (permalink / raw)
  To: zhong jiang, akpm, mark, jlbec
  Cc: dhowells, piaojun, viro, ocfs2-devel, linux-kernel



On 18/10/23 21:09, zhong jiang wrote:
> status is not used after setting its value. It is safe to remove
> the unused variable.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Acked-by: Joseph Qi <jiangqi903@gmail.com>

> ---
>  fs/ocfs2/dlmfs/dlmfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
> index 642e471..b03dd46 100644
> --- a/fs/ocfs2/dlmfs/dlmfs.c
> +++ b/fs/ocfs2/dlmfs/dlmfs.c
> @@ -179,7 +179,7 @@ static int dlmfs_file_open(struct inode *inode,
>  static int dlmfs_file_release(struct inode *inode,
>  			      struct file *file)
>  {
> -	int level, status;
> +	int level;
>  	struct dlmfs_inode_private *ip = DLMFS_I(inode);
>  	struct dlmfs_filp_private *fp = file->private_data;
>  
> @@ -188,7 +188,6 @@ static int dlmfs_file_release(struct inode *inode,
>  
>  	mlog(0, "close called on inode %lu\n", inode->i_ino);
>  
> -	status = 0;
>  	if (fp) {
>  		level = fp->fp_lock_level;
>  		if (level != DLM_LOCK_IV)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-24 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 13:09 [PATCH] ocfs2: dlmfs: remove set but not used variable 'status' zhong jiang
2018-10-24  0:57 ` piaojun
2018-10-24 10:37 ` Joseph Qi

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