From 7ef377c4d4abb7a2a74fc319dc1bce46f2449af7 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 13 Apr 2025 08:43:50 -0700 Subject: lib/crc: make the CPU feature static keys __ro_after_init All of the CRC library's CPU feature static_keys are initialized by initcalls and never change afterwards, so there's no need for them to be in the regular .data section. Put them in .data..ro_after_init instead. Reviewed-by: "Martin K. Petersen" Acked-by: Ard Biesheuvel Acked-by: Heiko Carstens # s390 Link: https://lore.kernel.org/r/20250413154350.10819-1-ebiggers@kernel.org Signed-off-by: Eric Biggers --- arch/sparc/lib/crc32_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sparc/lib') diff --git a/arch/sparc/lib/crc32_glue.c b/arch/sparc/lib/crc32_glue.c index a70752c729cf..d34e7cc7e1a1 100644 --- a/arch/sparc/lib/crc32_glue.c +++ b/arch/sparc/lib/crc32_glue.c @@ -17,7 +17,7 @@ #include #include -static DEFINE_STATIC_KEY_FALSE(have_crc32c_opcode); +static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_crc32c_opcode); u32 crc32_le_arch(u32 crc, const u8 *data, size_t len) { -- cgit v1.2.3