linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] nilfs2: Remove the unneeded result variable
@ 2022-08-31  3:34 cgel.zte
  2022-08-31  5:00 ` Ryusuke Konishi
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-31  3:34 UTC (permalink / raw)
  To: konishi.ryusuke; +Cc: linux-nilfs, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value nilfs_segctor_sync() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 fs/nilfs2/segment.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 0afe0832c754..9abae2c9120e 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2235,7 +2235,6 @@ int nilfs_construct_segment(struct super_block *sb)
 	struct the_nilfs *nilfs = sb->s_fs_info;
 	struct nilfs_sc_info *sci = nilfs->ns_writer;
 	struct nilfs_transaction_info *ti;
-	int err;
 
 	if (!sci)
 		return -EROFS;
@@ -2243,8 +2242,7 @@ int nilfs_construct_segment(struct super_block *sb)
 	/* A call inside transactions causes a deadlock. */
 	BUG_ON((ti = current->journal_info) && ti->ti_magic == NILFS_TI_MAGIC);
 
-	err = nilfs_segctor_sync(sci);
-	return err;
+	return nilfs_segctor_sync(sci);
 }
 
 /**
-- 
2.25.1

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

* Re: [PATCH linux-next] nilfs2: Remove the unneeded result variable
  2022-08-31  3:34 [PATCH linux-next] nilfs2: Remove the unneeded result variable cgel.zte
@ 2022-08-31  5:00 ` Ryusuke Konishi
  0 siblings, 0 replies; 2+ messages in thread
From: Ryusuke Konishi @ 2022-08-31  5:00 UTC (permalink / raw)
  To: cgel.zte; +Cc: linux-nilfs, linux-kernel, ye xingchen, Zeal Robot

On Wed, Aug 31, 2022 at 12:34 PM wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value nilfs_segctor_sync() directly instead of storing it in
> another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  fs/nilfs2/segment.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> index 0afe0832c754..9abae2c9120e 100644
> --- a/fs/nilfs2/segment.c
> +++ b/fs/nilfs2/segment.c
> @@ -2235,7 +2235,6 @@ int nilfs_construct_segment(struct super_block *sb)
>         struct the_nilfs *nilfs = sb->s_fs_info;
>         struct nilfs_sc_info *sci = nilfs->ns_writer;
>         struct nilfs_transaction_info *ti;
> -       int err;
>
>         if (!sci)
>                 return -EROFS;
> @@ -2243,8 +2242,7 @@ int nilfs_construct_segment(struct super_block *sb)
>         /* A call inside transactions causes a deadlock. */
>         BUG_ON((ti = current->journal_info) && ti->ti_magic == NILFS_TI_MAGIC);
>
> -       err = nilfs_segctor_sync(sci);
> -       return err;
> +       return nilfs_segctor_sync(sci);
>  }
>
>  /**
> --
> 2.25.1

The patch is not wrong though this kind of minor rewrite seems endless.
Anyway, I would like to queue this unless there is an objection.

Thanks,
Ryusuke Konishi

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

end of thread, other threads:[~2022-08-31  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  3:34 [PATCH linux-next] nilfs2: Remove the unneeded result variable cgel.zte
2022-08-31  5:00 ` Ryusuke Konishi

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