public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: remove redundant variable assignment in xfs_symlink()
@ 2020-03-29 11:03 xiakaixu1987
  2020-03-29 23:03 ` Dave Chinner
  2020-03-30 18:37 ` Chaitanya Kulkarni
  0 siblings, 2 replies; 3+ messages in thread
From: xiakaixu1987 @ 2020-03-29 11:03 UTC (permalink / raw)
  To: linux-xfs; +Cc: darrick.wong, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

The variables 'udqp' and 'gdqp' have been initialized, so remove
redundant variable assignment in xfs_symlink().

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 fs/xfs/xfs_symlink.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index d762d42..3ad82c3 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -176,7 +176,6 @@
 		return -ENAMETOOLONG;
 	ASSERT(pathlen > 0);
 
-	udqp = gdqp = NULL;
 	prid = xfs_get_initial_prid(dp);
 
 	/*
-- 
1.8.3.1


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

* Re: [PATCH] xfs: remove redundant variable assignment in xfs_symlink()
  2020-03-29 11:03 [PATCH] xfs: remove redundant variable assignment in xfs_symlink() xiakaixu1987
@ 2020-03-29 23:03 ` Dave Chinner
  2020-03-30 18:37 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2020-03-29 23:03 UTC (permalink / raw)
  To: xiakaixu1987; +Cc: linux-xfs, darrick.wong, Kaixu Xia

On Sun, Mar 29, 2020 at 07:03:35PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
> 
> The variables 'udqp' and 'gdqp' have been initialized, so remove
> redundant variable assignment in xfs_symlink().
> 
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
>  fs/xfs/xfs_symlink.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
> index d762d42..3ad82c3 100644
> --- a/fs/xfs/xfs_symlink.c
> +++ b/fs/xfs/xfs_symlink.c
> @@ -176,7 +176,6 @@
>  		return -ENAMETOOLONG;
>  	ASSERT(pathlen > 0);
>  
> -	udqp = gdqp = NULL;
>  	prid = xfs_get_initial_prid(dp);

Looks fine.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
-- 
Dave Chinner
david@fromorbit.com

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

* Re: [PATCH] xfs: remove redundant variable assignment in xfs_symlink()
  2020-03-29 11:03 [PATCH] xfs: remove redundant variable assignment in xfs_symlink() xiakaixu1987
  2020-03-29 23:03 ` Dave Chinner
@ 2020-03-30 18:37 ` Chaitanya Kulkarni
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-03-30 18:37 UTC (permalink / raw)
  To: xiakaixu1987@gmail.com, linux-xfs@vger.kernel.org
  Cc: darrick.wong@oracle.com, Kaixu Xia

On 03/29/2020 04:03 AM, xiakaixu1987@gmail.com wrote:
> ---
>   fs/xfs/xfs_symlink.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
> index d762d42..3ad82c3 100644
> --- a/fs/xfs/xfs_symlink.c
> +++ b/fs/xfs/xfs_symlink.c
> @@ -176,7 +176,6 @@
>   		return -ENAMETOOLONG;
>   	ASSERT(pathlen > 0);
>
> -	udqp = gdqp = NULL;
>   	prid = xfs_get_initial_prid(dp);
>
>   	/*
> -- 1.8.3.1

Since these two variables are initialized at the time of declaration
it make sense to remove this. Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

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

end of thread, other threads:[~2020-03-30 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-29 11:03 [PATCH] xfs: remove redundant variable assignment in xfs_symlink() xiakaixu1987
2020-03-29 23:03 ` Dave Chinner
2020-03-30 18:37 ` Chaitanya Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox