Skip to content

Commit

Permalink
s390/boot: Make boot_printk() return int
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasily Gorbik authored and Alexander Gordeev committed Jan 26, 2025
1 parent 816b5fe commit 847e5a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/s390/boot/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/boot/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -248,4 +248,5 @@ void boot_printk(const char *fmt, ...)
boot_rb_add(buf, len);
boot_console_earlyprintk(buf);
}
return len;
}

0 comments on commit 847e5a4

Please sign in to comment.