* [PATCH] ocfs2: Simplify return statement in ocfs2_filecheck_attr_store()
@ 2025-04-08 10:34 Thorsten Blum
2025-04-12 23:49 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-04-08 10:34 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Joseph Qi
Cc: Thorsten Blum, ocfs2-devel, linux-kernel
Don't negate 'ret' and simplify the return statement.
No functional changes intended.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
fs/ocfs2/filecheck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
index 1ad7106741f8..3ad7baf67658 100644
--- a/fs/ocfs2/filecheck.c
+++ b/fs/ocfs2/filecheck.c
@@ -505,5 +505,5 @@ static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
ocfs2_filecheck_handle_entry(ent, entry);
exit:
- return (!ret ? count : ret);
+ return ret ?: count;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ocfs2: Simplify return statement in ocfs2_filecheck_attr_store()
2025-04-08 10:34 [PATCH] ocfs2: Simplify return statement in ocfs2_filecheck_attr_store() Thorsten Blum
@ 2025-04-12 23:49 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2025-04-12 23:49 UTC (permalink / raw)
To: Thorsten Blum, Mark Fasheh, Joel Becker, akpm; +Cc: ocfs2-devel, linux-kernel
On 2025/4/8 18:34, Thorsten Blum wrote:
> Don't negate 'ret' and simplify the return statement.
>
> No functional changes intended.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/filecheck.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
> index 1ad7106741f8..3ad7baf67658 100644
> --- a/fs/ocfs2/filecheck.c
> +++ b/fs/ocfs2/filecheck.c
> @@ -505,5 +505,5 @@ static ssize_t ocfs2_filecheck_attr_store(struct kobject *kobj,
> ocfs2_filecheck_handle_entry(ent, entry);
>
> exit:
> - return (!ret ? count : ret);
> + return ret ?: count;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-12 23:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 10:34 [PATCH] ocfs2: Simplify return statement in ocfs2_filecheck_attr_store() Thorsten Blum
2025-04-12 23:49 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox