summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Putko <igorpetindev@gmail.com>2026-06-23 14:47:42 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-07-28 21:11:44 -0700
commit731a624641d30fb7a43bee68cf90ae08c19382ac (patch)
treefdf9ee3e067b031113bc9f25591cac869e54d660
parent8a28b50d6fbf8252eb8d17b22524823c8deff713 (diff)
downloadlinux-next-731a624641d30fb7a43bee68cf90ae08c19382ac.tar.gz
linux-next-731a624641d30fb7a43bee68cf90ae08c19382ac.zip
mm/kasan: remove redundant initialization for kasan_flag_write_only
Patch series "mm: remove redundant static variable initializations". This series removes explicit initializations of static bool variables to false within the mm/ subsystem. In C, static variables without explicit initialization are implicitly placed in the .bss section and initialized to zero/false by default. Removing these explicit initializations follows the Linux kernel coding style and avoids cluttering the data section. This patch (of 2): The static variable 'kasan_flag_write_only' is implicitly initialized to false. Remove the explicit initialization to follow the Linux kernel coding style. Link: https://lore.kernel.org/20260623114743.4565-1-igorpetindev@gmail.com Link: https://lore.kernel.org/20260623114743.4565-2-igorpetindev@gmail.com Signed-off-by: Igor Putko <igorpetindev@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Reviewed-by: Lance Yang <lance.yang@linux.dev> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Naoya Horiguchi <nao.horiguchi@gmail.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/kasan/hw_tags.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c
index cbef5e450954..a848eb2f9910 100644
--- a/mm/kasan/hw_tags.c
+++ b/mm/kasan/hw_tags.c
@@ -61,7 +61,7 @@ DEFINE_STATIC_KEY_FALSE(kasan_flag_vmalloc);
EXPORT_SYMBOL_GPL(kasan_flag_vmalloc);
/* Whether to check write accesses only. */
-static bool kasan_flag_write_only = false;
+static bool kasan_flag_write_only;
#define PAGE_ALLOC_SAMPLE_DEFAULT 1
#define PAGE_ALLOC_SAMPLE_ORDER_DEFAULT 3