linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early()
@ 2015-01-03  9:29 Chen Gang
  2015-01-03  9:49 ` Chen Gang
  2015-01-05  9:21 ` Heiko Carstens
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Gang @ 2015-01-03  9:29 UTC (permalink / raw)
  To: schwidefsky, heiko.carstens; +Cc: linux-s390, linux-kernel

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

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/s390/boot/compressed/misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
index 57cbaff..09003b2 100644
--- a/arch/s390/boot/compressed/misc.c
+++ b/arch/s390/boot/compressed/misc.c
@@ -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)
 {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early()
  2015-01-03  9:29 [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early() Chen Gang
@ 2015-01-03  9:49 ` Chen Gang
  2015-01-05  9:21 ` Heiko Carstens
  1 sibling, 0 replies; 4+ messages in thread
From: Chen Gang @ 2015-01-03  9:49 UTC (permalink / raw)
  To: schwidefsky, heiko.carstens; +Cc: linux-s390, linux-kernel


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

Thanks.

On 01/03/2015 05:29 PM, Chen Gang wrote:
> _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.
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/s390/boot/compressed/misc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
> index 57cbaff..09003b2 100644
> --- a/arch/s390/boot/compressed/misc.c
> +++ b/arch/s390/boot/compressed/misc.c
> @@ -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)
>  {
> 

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early()
  2015-01-03  9:29 [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early() Chen Gang
  2015-01-03  9:49 ` Chen Gang
@ 2015-01-05  9:21 ` Heiko Carstens
  2015-01-05  9:37   ` Chen Gang S
  1 sibling, 1 reply; 4+ messages in thread
From: Heiko Carstens @ 2015-01-05  9:21 UTC (permalink / raw)
  To: Chen Gang; +Cc: schwidefsky, linux-s390, linux-kernel

On Sat, Jan 03, 2015 at 05:29:07PM +0800, Chen Gang wrote:
> _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.
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  arch/s390/boot/compressed/misc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
> index 57cbaff..09003b2 100644
> --- a/arch/s390/boot/compressed/misc.c
> +++ b/arch/s390/boot/compressed/misc.c
> @@ -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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early()
  2015-01-05  9:21 ` Heiko Carstens
@ 2015-01-05  9:37   ` Chen Gang S
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang S @ 2015-01-05  9:37 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: schwidefsky, linux-s390, linux-kernel

On 1/5/15 17:21, Heiko Carstens wrote:
> On Sat, Jan 03, 2015 at 05:29:07PM +0800, Chen Gang wrote:
>> _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.
>>
>> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
>> ---
>>  arch/s390/boot/compressed/misc.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c
>> index 57cbaff..09003b2 100644
>> --- a/arch/s390/boot/compressed/misc.c
>> +++ b/arch/s390/boot/compressed/misc.c
>> @@ -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.
> 

OK, Thanks.

-- 
Chen Gang

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-05  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-03  9:29 [PATCH] s390: boot: compressed: misc: Express the return value of _sclp_print_early() Chen Gang
2015-01-03  9:49 ` Chen Gang
2015-01-05  9:21 ` Heiko Carstens
2015-01-05  9:37   ` Chen Gang S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).