Skip to content

Commit

Permalink
s390/sclp: fix declaration of _sclp_print_early()
Browse files Browse the repository at this point in the history
_sclp_print_early() has return value: at present, return 0 for OK, 1 for
failure. It returns '%r2', so use 'long' as return value (upper caller
can check '%r2' directly). The related warning:

    CC      arch/s390/boot/compressed/misc.o
  arch/s390/boot/compressed/misc.c:66:8: warning: type defaults to 'int' in declaration of '_sclp_print_early' [-Wimplicit-int]
   extern _sclp_print_early(const char *);
          ^

At present, _sclp_print_early() is only used by puts(), so can still
remain its declaration in 'misc.c' file.

[heiko.carstens@de.ibm.com]: move declaration to sclp.h header file

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Chen Gang authored and Martin Schwidefsky committed Jan 8, 2015
1 parent 47523c9 commit fbf87df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/s390/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <asm/uaccess.h>
#include <asm/page.h>
#include <asm/sclp.h>
#include <asm/ipl.h>
#include "sizes.h"

Expand Down Expand Up @@ -63,8 +64,6 @@ static unsigned long free_mem_end_ptr;
#include "../../../../lib/decompress_unxz.c"
#endif

extern _sclp_print_early(const char *);

static int puts(const char *s)
{
_sclp_print_early(s);
Expand Down
2 changes: 2 additions & 0 deletions arch/s390/include/asm/sclp.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ void sclp_early_detect(void);
int sclp_has_siif(void);
unsigned int sclp_get_ibc(void);

long _sclp_print_early(const char *);

#endif /* _ASM_S390_SCLP_H */

0 comments on commit fbf87df

Please sign in to comment.