public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/boot/compressed: make error() take const char *
@ 2026-02-18 16:03 Reda CHERKAOUI
  2026-02-18 21:58 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Reda CHERKAOUI @ 2026-02-18 16:03 UTC (permalink / raw)
  To: x86; +Cc: tglx, mingo, bp, dave.hansen, hpa, linux-kernel, Reda CHERKAOUI

error() does not modify its argument, but it currently takes a non-const
char * which can lead to const-discard warnings when callers pass constant
strings. Make error() take a const char * to match its usage.

Signed-off-by: Reda CHERKAOUI <redacherkaoui67@gmail.com>
---
 arch/x86/boot/compressed/error.c | 2 +-
 arch/x86/boot/compressed/error.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/error.c b/arch/x86/boot/compressed/error.c
index 19a8251de506..091c61999b69 100644
--- a/arch/x86/boot/compressed/error.c
+++ b/arch/x86/boot/compressed/error.c
@@ -14,7 +14,7 @@ void warn(const char *m)
 	error_putstr("\n\n");
 }
 
-void error(char *m)
+void error(const char *m)
 {
 	warn(m);
 	error_putstr(" -- System halted");
diff --git a/arch/x86/boot/compressed/error.h b/arch/x86/boot/compressed/error.h
index 31f9e080d61a..ccc292e3c853 100644
--- a/arch/x86/boot/compressed/error.h
+++ b/arch/x86/boot/compressed/error.h
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 
 void warn(const char *m);
-void error(char *m) __noreturn;
+void error(const char *m) __noreturn;
 void panic(const char *fmt, ...) __noreturn __cold;
 
 #endif /* BOOT_COMPRESSED_ERROR_H */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-19  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 16:03 [PATCH] x86/boot/compressed: make error() take const char * Reda CHERKAOUI
2026-02-18 21:58 ` kernel test robot
2026-02-19  0:33 ` kernel test robot
2026-02-19  4:23 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox