public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: xfs_qm: remove unnecessary ‘0’ values from error
@ 2022-12-23  8:11 Li zeming
  2023-01-03 18:07 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2022-12-23  8:11 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs, linux-kernel, Li zeming

error is assigned first, so it does not need to initialize the
assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 fs/xfs/xfs_qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index ff53d40a2dae..e2c542f6dcd4 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
 
 	while (1) {
 		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
-		int		error = 0;
+		int		error;
 		int		i;
 
 		mutex_lock(&qi->qi_tree_lock);
-- 
2.18.2


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

* Re: [PATCH] xfs: xfs_qm: remove unnecessary ‘0’ values from error
  2022-12-23  8:11 [PATCH] xfs: xfs_qm: remove unnecessary ‘0’ values from error Li zeming
@ 2023-01-03 18:07 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2023-01-03 18:07 UTC (permalink / raw)
  To: Li zeming; +Cc: linux-xfs, linux-kernel

On Fri, Dec 23, 2022 at 04:11:14PM +0800, Li zeming wrote:
> error is assigned first, so it does not need to initialize the
> assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Looks fine to me...
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_qm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index ff53d40a2dae..e2c542f6dcd4 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
>  
>  	while (1) {
>  		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
> -		int		error = 0;
> +		int		error;
>  		int		i;
>  
>  		mutex_lock(&qi->qi_tree_lock);
> -- 
> 2.18.2
> 

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

end of thread, other threads:[~2023-01-03 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23  8:11 [PATCH] xfs: xfs_qm: remove unnecessary ‘0’ values from error Li zeming
2023-01-03 18:07 ` Darrick J. Wong

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