summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2024-11-20 22:36:46 +0300
committerAlexander Gordeev <agordeev@linux.ibm.com>2025-01-26 19:24:01 +0300
commit847e5a4c713747e8c0e9e25bda00aea782d1062b (patch)
tree82611c10c3f85606bc70ba7f926239314c3ba7af
parent816b5feaed13946b06fb7c63b7343fbfd83e520f (diff)
downloadlinux-847e5a4c713747e8c0e9e25bda00aea782d1062b.tar.xz
s390/boot: Make boot_printk() return int
Modify boot_printk() to return int, aligning it with printk(). Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
-rw-r--r--arch/s390/boot/boot.h2
-rw-r--r--arch/s390/boot/printk.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/boot/boot.h b/arch/s390/boot/boot.h
index 80e86387bee5..dbfba6822d6f 100644
--- a/arch/s390/boot/boot.h
+++ b/arch/s390/boot/boot.h
@@ -72,7 +72,7 @@ void print_pgm_check_info(void);
unsigned long randomize_within_range(unsigned long size, unsigned long align,
unsigned long min, unsigned long max);
void setup_vmem(unsigned long kernel_start, unsigned long kernel_end, unsigned long asce_limit);
-void __printf(1, 2) boot_printk(const char *fmt, ...);
+int __printf(1, 2) boot_printk(const char *fmt, ...);
void print_stacktrace(unsigned long sp);
void error(char *m);
int get_random(unsigned long limit, unsigned long *value);
diff --git a/arch/s390/boot/printk.c b/arch/s390/boot/printk.c
index e49a9be6d555..311fb45c097c 100644
--- a/arch/s390/boot/printk.c
+++ b/arch/s390/boot/printk.c
@@ -174,7 +174,7 @@ static void boot_console_earlyprintk(const char *buf)
(lenmod == 'z') ? va_arg(args, typemod long) : \
va_arg(args, typemod int))
-void boot_printk(const char *fmt, ...)
+int boot_printk(const char *fmt, ...)
{
char buf[1024] = { 0 };
char *end = buf + sizeof(buf) - 1; /* make sure buf is 0 terminated */
@@ -248,4 +248,5 @@ out:
boot_rb_add(buf, len);
boot_console_earlyprintk(buf);
}
+ return len;
}