Skip to content

Commit

Permalink
s390/zcrypt: switch return type to bool for ap_instructions_available()
Browse files Browse the repository at this point in the history
Function ap_instructions_available() had returntype int but
in fact returned 1 for true and 0 for false. Changed returntype
to bool.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Harald Freudenberger authored and Martin Schwidefsky committed Aug 20, 2018
1 parent 28b7465 commit 9b97e9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/s390/include/asm/ap.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ struct ap_queue_status {
/**
* ap_intructions_available() - Test if AP instructions are available.
*
* Returns 1 if the AP instructions are installed, otherwise 0.
* Returns true if the AP instructions are installed, otherwise false.
*/
static inline int ap_instructions_available(void)
static inline bool ap_instructions_available(void)
{
register unsigned long reg0 asm ("0") = AP_MKQID(0, 0);
register unsigned long reg1 asm ("1") = 0;
Expand All @@ -65,7 +65,7 @@ static inline int ap_instructions_available(void)
: "+d" (reg1), "+d" (reg2)
: "d" (reg0)
: "cc");
return reg1;
return reg1 != 0;
}

/**
Expand Down

0 comments on commit 9b97e9f

Please sign in to comment.