Skip to content

Commit 6d33531

Browse files
arndbbp3tk0v
authored andcommitted
x86/purgatory: Include header for warn() declaration
The purgatory code uses parts of the decompressor and provides its own warn() function, but has to include the corresponding header file to avoid a -Wmissing-prototypes warning. It turns out that this function prototype actually differs from the declaration, so change it to get a constant pointer in the declaration and the other definition as well. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 65412c8 commit 6d33531

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

arch/x86/boot/compressed/error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "misc.h"
88
#include "error.h"
99

10-
void warn(char *m)
10+
void warn(const char *m)
1111
{
1212
error_putstr("\n\n");
1313
error_putstr(m);

arch/x86/boot/compressed/error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <linux/compiler.h>
66

7-
void warn(char *m);
7+
void warn(const char *m);
88
void error(char *m) __noreturn;
99
void panic(const char *fmt, ...) __noreturn __cold;
1010

arch/x86/purgatory/purgatory.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <crypto/sha2.h>
1515
#include <asm/purgatory.h>
1616

17+
#include "../boot/compressed/error.h"
1718
#include "../boot/string.h"
1819

1920
u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory");

0 commit comments

Comments
 (0)