Skip to contentSkip to conversation

s390: boot: compressed: misc: Express the return value of _sclp_print_early()

PATCH Applied Chen Gang 2 participants 4 messages Jan 3, 2015 – Jan 5, 2015 s390

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 s390: boot: compressed: misc: Express the return value of _sclp_print_early()

_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.

---
 arch/s390/boot/compressed/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/boot/compressed/misc.c +1 -1
index 57cbaff..09003b2 100644
@@ -63,7 +63,7 @@ static unsigned long free_mem_end_ptr;
 #include "../../../../lib/decompress_unxz.c"
 #endif
 
-extern _sclp_print_early(const char *);
+extern long _sclp_print_early(const char *);
 
 static int puts(const char *s)
 {
Signature · 1 line
1.7.9.5
author
#1 lore raw

Our s390 can pass allmodconfig at present (although it is still has various warnings).

Thanks.

Quoted 31 lines · Chen Gang

_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.

---
 arch/s390/boot/compressed/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/boot/compressed/misc.c +1 -1
index 57cbaff..09003b2 100644
@@ -63,7 +63,7 @@ static unsigned long free_mem_end_ptr;
 #include "../../../../lib/decompress_unxz.c"
 #endif
 
-extern _sclp_print_early(const char *);
+extern long _sclp_print_early(const char *);
 
 static int puts(const char *s)
 {
Signature · 3 lines
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
#2 lore raw
In reply to Chen Gang
Quoted 22 lines · Chen Gang

_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.

---
 arch/s390/boot/compressed/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/boot/compressed/misc.c +0 -0
index 57cbaff..09003b2 100644

arch/s390/boot/compressed/misc.c static unsigned long free_mem_end_ptr; · line 66

Quoted 5 lines
arch/s390/boot/compressed/misc.c +1 -1
@@ -63,7 +63,7 @@ static unsigned long free_mem_end_ptr;
 #include "../../../../lib/decompress_unxz.c"
 #endif
 
-extern _sclp_print_early(const char *);
+extern long _sclp_print_early(const char *);

Thanks, applied. However I moved the declaration to the sclp header file.

#3 lore raw
Quoted 26 lines · Heiko Carstens
Quoted 25 lines · Chen Gang

_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.

---
 arch/s390/boot/compressed/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/boot/compressed/misc.c +0 -0
index 57cbaff..09003b2 100644
@@ -63,7 +63,7 @@ static unsigned long free_mem_end_ptr;
 #include "../../../../lib/decompress_unxz.c"
 #endif
 
Quoted 5 lines

arch/s390/boot/compressed/misc.c static unsigned long free_mem_end_ptr; · line 66

Quoted 2 lines
arch/s390/boot/compressed/misc.c +1 -1
-extern _sclp_print_early(const char *);
+extern long _sclp_print_early(const char *);

Thanks, applied. However I moved the declaration to the sclp header file.

OK, Thanks.

Signature · 3 lines
Chen Gang

Open, share, and attitude like air, water, and life which God blessed