* [PATCH] JFS: Remove redundant 0 value initialization
@ 2025-08-19 3:28 Liao Yuanhong
2025-08-19 9:16 ` Markus Elfring
2025-09-17 18:40 ` [Jfs-discussion] " Dave Kleikamp
0 siblings, 2 replies; 3+ messages in thread
From: Liao Yuanhong @ 2025-08-19 3:28 UTC (permalink / raw)
To: Dave Kleikamp, open list:JFS FILESYSTEM, open list; +Cc: Liao Yuanhong
The jfs_log struct is already zeroed by kzalloc(). It's redundant to
initialize dummy_log->base to 0.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
fs/jfs/jfs_logmgr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 270808b6219b..b343c5ea1159 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1199,7 +1199,6 @@ static int open_dummy_log(struct super_block *sb)
init_waitqueue_head(&dummy_log->syncwait);
dummy_log->no_integrity = 1;
/* Make up some stuff */
- dummy_log->base = 0;
dummy_log->size = 1024;
rc = lmLogInit(dummy_log);
if (rc) {
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] JFS: Remove redundant 0 value initialization
2025-08-19 3:28 [PATCH] JFS: Remove redundant 0 value initialization Liao Yuanhong
@ 2025-08-19 9:16 ` Markus Elfring
2025-09-17 18:40 ` [Jfs-discussion] " Dave Kleikamp
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2025-08-19 9:16 UTC (permalink / raw)
To: Liao Yuanhong, jfs-discussion, Dave Kleikamp; +Cc: LKML
> The jfs_log struct is already zeroed by kzalloc(). It's redundant to
> initialize dummy_log->base to 0.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc2#n94
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Jfs-discussion] [PATCH] JFS: Remove redundant 0 value initialization
2025-08-19 3:28 [PATCH] JFS: Remove redundant 0 value initialization Liao Yuanhong
2025-08-19 9:16 ` Markus Elfring
@ 2025-09-17 18:40 ` Dave Kleikamp
1 sibling, 0 replies; 3+ messages in thread
From: Dave Kleikamp @ 2025-09-17 18:40 UTC (permalink / raw)
To: Liao Yuanhong, open list:JFS FILESYSTEM, open list
Applied.
Thanks,
Shaggy
On 8/18/25 10:28PM, Liao Yuanhong via Jfs-discussion wrote:
> The jfs_log struct is already zeroed by kzalloc(). It's redundant to
> initialize dummy_log->base to 0.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> fs/jfs/jfs_logmgr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
> index 270808b6219b..b343c5ea1159 100644
> --- a/fs/jfs/jfs_logmgr.c
> +++ b/fs/jfs/jfs_logmgr.c
> @@ -1199,7 +1199,6 @@ static int open_dummy_log(struct super_block *sb)
> init_waitqueue_head(&dummy_log->syncwait);
> dummy_log->no_integrity = 1;
> /* Make up some stuff */
> - dummy_log->base = 0;
> dummy_log->size = 1024;
> rc = lmLogInit(dummy_log);
> if (rc) {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-17 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 3:28 [PATCH] JFS: Remove redundant 0 value initialization Liao Yuanhong
2025-08-19 9:16 ` Markus Elfring
2025-09-17 18:40 ` [Jfs-discussion] " Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®