* [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
* Re: [PATCH] x86/boot/compressed: make error() take const char *
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
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-02-18 21:58 UTC (permalink / raw)
To: Reda CHERKAOUI, x86
Cc: oe-kbuild-all, tglx, mingo, bp, dave.hansen, hpa, linux-kernel,
Reda CHERKAOUI
Hi Reda,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/x86/core]
[also build test ERROR on tip/master linus/master v6.19 next-20260218]
[cannot apply to tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Reda-CHERKAOUI/x86-boot-compressed-make-error-take-const-char/20260219-000605
base: tip/x86/core
patch link: https://lore.kernel.org/r/20260218160319.31884-1-redacherkaoui67%40gmail.com
patch subject: [PATCH] x86/boot/compressed: make error() take const char *
config: i386-allnoconfig (https://download.01.org/0day-ci/archive/20260219/202602190529.eucRnnqd-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260219/202602190529.eucRnnqd-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602190529.eucRnnqd-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/boot/compressed/misc.c: In function 'extract_kernel':
>> arch/x86/boot/compressed/misc.c:521:61: error: passing argument 3 of 'decompress_kernel' from incompatible pointer type [-Wincompatible-pointer-types]
521 | entry_offset = decompress_kernel(output, virt_addr, error);
| ^~~~~
| |
| __attribute__((noreturn)) void (*)(const char *)
arch/x86/boot/compressed/misc.c:345:40: note: expected 'void (*)(char *)' but argument is of type '__attribute__((noreturn)) void (*)(const char *)'
345 | void (*error)(char *x))
| ~~~~~~~^~~~~~~~~~~~~~~
vim +/decompress_kernel +521 arch/x86/boot/compressed/misc.c
^1da177e4c3f41 arch/i386/boot/compressed/misc.c Linus Torvalds 2005-04-16 513
e605a425975b07 arch/x86/boot/compressed/misc.c Joe Millenbach 2012-07-19 514 debug_putstr("\nDecompressing Linux... ");
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 515
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 516 if (init_unaccepted_memory()) {
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 517 debug_putstr("Accepting memory... ");
5adfeaecc487e7 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2024-08-09 518 accept_memory(__pa(output), needed_size);
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 519 }
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 520
83381519352d6b arch/x86/boot/compressed/misc.c Ard Biesheuvel 2023-08-07 @521 entry_offset = decompress_kernel(output, virt_addr, error);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/boot/compressed: make error() take const char *
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
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-02-19 0:33 UTC (permalink / raw)
To: Reda CHERKAOUI, x86
Cc: oe-kbuild-all, tglx, mingo, bp, dave.hansen, hpa, linux-kernel,
Reda CHERKAOUI
Hi Reda,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tip/x86/core]
[also build test WARNING on tip/master linus/master v6.19 next-20260218]
[cannot apply to tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Reda-CHERKAOUI/x86-boot-compressed-make-error-take-const-char/20260219-000605
base: tip/x86/core
patch link: https://lore.kernel.org/r/20260218160319.31884-1-redacherkaoui67%40gmail.com
patch subject: [PATCH] x86/boot/compressed: make error() take const char *
config: x86_64-buildonly-randconfig-002-20260219 (https://download.01.org/0day-ci/archive/20260219/202602190801.5xGbl6Eh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260219/202602190801.5xGbl6Eh-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602190801.5xGbl6Eh-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/boot/compressed/misc.c: In function 'extract_kernel':
>> arch/x86/boot/compressed/misc.c:521:61: warning: passing argument 3 of 'decompress_kernel' from incompatible pointer type [-Wincompatible-pointer-types]
521 | entry_offset = decompress_kernel(output, virt_addr, error);
| ^~~~~
| |
| __attribute__((noreturn)) void (*)(const char *)
arch/x86/boot/compressed/misc.c:345:40: note: expected 'void (*)(char *)' but argument is of type '__attribute__((noreturn)) void (*)(const char *)'
345 | void (*error)(char *x))
| ~~~~~~~^~~~~~~~~~~~~~~
vim +/decompress_kernel +521 arch/x86/boot/compressed/misc.c
^1da177e4c3f41 arch/i386/boot/compressed/misc.c Linus Torvalds 2005-04-16 513
e605a425975b07 arch/x86/boot/compressed/misc.c Joe Millenbach 2012-07-19 514 debug_putstr("\nDecompressing Linux... ");
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 515
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 516 if (init_unaccepted_memory()) {
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 517 debug_putstr("Accepting memory... ");
5adfeaecc487e7 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2024-08-09 518 accept_memory(__pa(output), needed_size);
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 519 }
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 520
83381519352d6b arch/x86/boot/compressed/misc.c Ard Biesheuvel 2023-08-07 @521 entry_offset = decompress_kernel(output, virt_addr, error);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/boot/compressed: make error() take const char *
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
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-02-19 4:23 UTC (permalink / raw)
To: Reda CHERKAOUI, x86
Cc: llvm, oe-kbuild-all, tglx, mingo, bp, dave.hansen, hpa,
linux-kernel, Reda CHERKAOUI
Hi Reda,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/x86/core]
[also build test ERROR on tip/master linus/master v6.19 next-20260218]
[cannot apply to tip/auto-latest]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Reda-CHERKAOUI/x86-boot-compressed-make-error-take-const-char/20260219-000605
base: tip/x86/core
patch link: https://lore.kernel.org/r/20260218160319.31884-1-redacherkaoui67%40gmail.com
patch subject: [PATCH] x86/boot/compressed: make error() take const char *
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260219/202602191200.xX8igqdm-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260219/202602191200.xX8igqdm-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602191200.xX8igqdm-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/boot/compressed/misc.c:521:54: error: incompatible function pointer types passing 'void (const char *) __attribute__((noreturn))' to parameter of type 'void (*)(char *)' [-Wincompatible-function-pointer-types]
521 | entry_offset = decompress_kernel(output, virt_addr, error);
| ^~~~~
arch/x86/boot/compressed/misc.c:345:12: note: passing argument to parameter 'error' here
345 | void (*error)(char *x))
| ^
1 error generated.
vim +521 arch/x86/boot/compressed/misc.c
^1da177e4c3f41 arch/i386/boot/compressed/misc.c Linus Torvalds 2005-04-16 513
e605a425975b07 arch/x86/boot/compressed/misc.c Joe Millenbach 2012-07-19 514 debug_putstr("\nDecompressing Linux... ");
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 515
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 516 if (init_unaccepted_memory()) {
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 517 debug_putstr("Accepting memory... ");
5adfeaecc487e7 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2024-08-09 518 accept_memory(__pa(output), needed_size);
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 519 }
3fd1239a783522 arch/x86/boot/compressed/misc.c Kiryl Shutsemau 2023-06-06 520
83381519352d6b arch/x86/boot/compressed/misc.c Ard Biesheuvel 2023-08-07 @521 entry_offset = decompress_kernel(output, virt_addr, error);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [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