kcsan: Remove redundant zero-initialization of globals
authorMarco Elver <elver@google.com>
Tue, 30 Nov 2021 11:44:10 +0000 (12:44 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 10 Dec 2021 00:42:26 +0000 (16:42 -0800)
They are implicitly zero-initialized, remove explicit initialization.
It keeps the upcoming additions to kcsan_ctx consistent with the rest.

No functional change intended.

Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
init/init_task.c
kernel/kcsan/core.c

index 2d024066e27bd8e066c7b8139cc1c3d628ad292f..73cc8f03511a3e66720393c42171337f5e64ec14 100644 (file)
@@ -182,11 +182,6 @@ struct task_struct init_task
 #endif
 #ifdef CONFIG_KCSAN
        .kcsan_ctx = {
-               .disable_count          = 0,
-               .atomic_next            = 0,
-               .atomic_nest_count      = 0,
-               .in_flat_atomic         = false,
-               .access_mask            = 0,
                .scoped_accesses        = {LIST_POISON1, NULL},
        },
 #endif
index 6bfd3040f46be7bd7ef2732572112c590be964aa..e34a1710b7bcc64983908514b49a69ee88f1afda 100644 (file)
@@ -44,11 +44,6 @@ bool kcsan_enabled;
 
 /* Per-CPU kcsan_ctx for interrupts */
 static DEFINE_PER_CPU(struct kcsan_ctx, kcsan_cpu_ctx) = {
-       .disable_count          = 0,
-       .atomic_next            = 0,
-       .atomic_nest_count      = 0,
-       .in_flat_atomic         = false,
-       .access_mask            = 0,
        .scoped_accesses        = {LIST_POISON1, NULL},
 };