diff mbox series

[kvm-unit-tests,6/9] lib: s390x: Print PGM code as hex

Message ID 20210922071811.1913-7-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: Cleanup and maintenance 2 | expand

Commit Message

Janosch Frank Sept. 22, 2021, 7:18 a.m. UTC
We have them defined as hex constants in lib/s390x/asm/arch_def.h so
why not print them as hex values?

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 lib/s390x/interrupt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Claudio Imbrenda Sept. 22, 2021, 9:24 a.m. UTC | #1
On Wed, 22 Sep 2021 07:18:08 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> We have them defined as hex constants in lib/s390x/asm/arch_def.h so
> why not print them as hex values?
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> ---
>  lib/s390x/interrupt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
> index 126d4c0a..27d3b767 100644
> --- a/lib/s390x/interrupt.c
> +++ b/lib/s390x/interrupt.c
> @@ -169,7 +169,7 @@ static void print_pgm_info(struct stack_frame_int *stack)
>  		  lc->pgm_old_psw.addr <= (uintptr_t)sie_exit);
>  
>  	printf("\n");
> -	printf("Unexpected program interrupt %s: %d on cpu %d at %#lx, ilen %d\n",
> +	printf("Unexpected program interrupt %s: %#x on cpu %d at %#lx, ilen %d\n",
>  	       in_sie ? "in SIE" : "",
>  	       lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, lc->pgm_int_id);
>  	print_int_regs(stack);
Thomas Huth Sept. 27, 2021, 5:43 p.m. UTC | #2
On 22/09/2021 09.18, Janosch Frank wrote:
> We have them defined as hex constants in lib/s390x/asm/arch_def.h so
> why not print them as hex values?
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>   lib/s390x/interrupt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
> index 126d4c0a..27d3b767 100644
> --- a/lib/s390x/interrupt.c
> +++ b/lib/s390x/interrupt.c
> @@ -169,7 +169,7 @@ static void print_pgm_info(struct stack_frame_int *stack)
>   		  lc->pgm_old_psw.addr <= (uintptr_t)sie_exit);
>   
>   	printf("\n");
> -	printf("Unexpected program interrupt %s: %d on cpu %d at %#lx, ilen %d\n",
> +	printf("Unexpected program interrupt %s: %#x on cpu %d at %#lx, ilen %d\n",
>   	       in_sie ? "in SIE" : "",
>   	       lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, lc->pgm_int_id);
>   	print_int_regs(stack);
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
index 126d4c0a..27d3b767 100644
--- a/lib/s390x/interrupt.c
+++ b/lib/s390x/interrupt.c
@@ -169,7 +169,7 @@  static void print_pgm_info(struct stack_frame_int *stack)
 		  lc->pgm_old_psw.addr <= (uintptr_t)sie_exit);
 
 	printf("\n");
-	printf("Unexpected program interrupt %s: %d on cpu %d at %#lx, ilen %d\n",
+	printf("Unexpected program interrupt %s: %#x on cpu %d at %#lx, ilen %d\n",
 	       in_sie ? "in SIE" : "",
 	       lc->pgm_int_code, stap(), lc->pgm_old_psw.addr, lc->pgm_int_id);
 	print_int_regs(stack);