summaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/ap.h14
-rw-r--r--arch/s390/include/uapi/asm/zcrypt.h72
2 files changed, 43 insertions, 43 deletions
diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h
index 046e044a48d0..8c00fd509c45 100644
--- a/arch/s390/include/asm/ap.h
+++ b/arch/s390/include/asm/ap.h
@@ -49,23 +49,23 @@ struct ap_queue_status {
/**
* ap_intructions_available() - Test if AP instructions are available.
*
- * Returns 0 if the AP instructions are installed.
+ * 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") = -ENODEV;
- register unsigned long reg2 asm ("2");
+ register unsigned long reg1 asm ("1") = 0;
+ register unsigned long reg2 asm ("2") = 0;
asm volatile(
" .long 0xb2af0000\n" /* PQAP(TAPQ) */
- "0: la %0,0\n"
+ "0: la %0,1\n"
"1:\n"
EX_TABLE(0b, 1b)
- : "+d" (reg1), "=d" (reg2)
+ : "+d" (reg1), "+d" (reg2)
: "d" (reg0)
: "cc");
- return reg1;
+ return reg1 != 0;
}
/**
diff --git a/arch/s390/include/uapi/asm/zcrypt.h b/arch/s390/include/uapi/asm/zcrypt.h
index b62e0614e440..2bb1f3bb98ac 100644
--- a/arch/s390/include/uapi/asm/zcrypt.h
+++ b/arch/s390/include/uapi/asm/zcrypt.h
@@ -32,12 +32,12 @@
* - length(n_modulus) = inputdatalength
*/
struct ica_rsa_modexpo {
- char __user * inputdata;
- unsigned int inputdatalength;
- char __user * outputdata;
- unsigned int outputdatalength;
- char __user * b_key;
- char __user * n_modulus;
+ char __user *inputdata;
+ unsigned int inputdatalength;
+ char __user *outputdata;
+ unsigned int outputdatalength;
+ char __user *b_key;
+ char __user *n_modulus;
};
/**
@@ -55,15 +55,15 @@ struct ica_rsa_modexpo {
* - length(u_mult_inv) = inputdatalength/2 + 8
*/
struct ica_rsa_modexpo_crt {
- char __user * inputdata;
- unsigned int inputdatalength;
- char __user * outputdata;
- unsigned int outputdatalength;
- char __user * bp_key;
- char __user * bq_key;
- char __user * np_prime;
- char __user * nq_prime;
- char __user * u_mult_inv;
+ char __user *inputdata;
+ unsigned int inputdatalength;
+ char __user *outputdata;
+ unsigned int outputdatalength;
+ char __user *bp_key;
+ char __user *bq_key;
+ char __user *np_prime;
+ char __user *nq_prime;
+ char __user *u_mult_inv;
};
/**
@@ -93,18 +93,18 @@ struct CPRBX {
unsigned int req_extbl; /* request extension block len */
unsigned char pad_001[4]; /* reserved */
unsigned int rpld_extbl; /* replied extension block len */
- unsigned char padx000[16 - sizeof (char *)];
- unsigned char * req_parmb; /* request parm block 'address' */
- unsigned char padx001[16 - sizeof (char *)];
- unsigned char * req_datab; /* request data block 'address' */
- unsigned char padx002[16 - sizeof (char *)];
- unsigned char * rpl_parmb; /* reply parm block 'address' */
- unsigned char padx003[16 - sizeof (char *)];
- unsigned char * rpl_datab; /* reply data block 'address' */
- unsigned char padx004[16 - sizeof (char *)];
- unsigned char * req_extb; /* request extension block 'addr'*/
- unsigned char padx005[16 - sizeof (char *)];
- unsigned char * rpl_extb; /* reply extension block 'address'*/
+ unsigned char padx000[16 - sizeof(char *)];
+ unsigned char *req_parmb; /* request parm block 'address' */
+ unsigned char padx001[16 - sizeof(char *)];
+ unsigned char *req_datab; /* request data block 'address' */
+ unsigned char padx002[16 - sizeof(char *)];
+ unsigned char *rpl_parmb; /* reply parm block 'address' */
+ unsigned char padx003[16 - sizeof(char *)];
+ unsigned char *rpl_datab; /* reply data block 'address' */
+ unsigned char padx004[16 - sizeof(char *)];
+ unsigned char *req_extb; /* request extension block 'addr'*/
+ unsigned char padx005[16 - sizeof(char *)];
+ unsigned char *rpl_extb; /* reply extension block 'address'*/
unsigned short ccp_rtcode; /* server return code */
unsigned short ccp_rscode; /* server reason code */
unsigned int mac_data_len; /* Mac Data Length */
@@ -127,17 +127,17 @@ struct ica_xcRB {
unsigned int user_defined;
unsigned short request_ID;
unsigned int request_control_blk_length;
- unsigned char padding1[16 - sizeof (char *)];
- char __user * request_control_blk_addr;
+ unsigned char padding1[16 - sizeof(char *)];
+ char __user *request_control_blk_addr;
unsigned int request_data_length;
- char padding2[16 - sizeof (char *)];
- char __user * request_data_address;
+ char padding2[16 - sizeof(char *)];
+ char __user *request_data_address;
unsigned int reply_control_blk_length;
- char padding3[16 - sizeof (char *)];
- char __user * reply_control_blk_addr;
+ char padding3[16 - sizeof(char *)];
+ char __user *reply_control_blk_addr;
unsigned int reply_data_length;
- char padding4[16 - sizeof (char *)];
- char __user * reply_data_addr;
+ char padding4[16 - sizeof(char *)];
+ char __user *reply_data_addr;
unsigned short priority_window;
unsigned int status;
} __attribute__((packed));
@@ -233,7 +233,7 @@ struct zcrypt_device_matrix_ext {
struct zcrypt_device_status_ext device[MAX_ZDEV_ENTRIES_EXT];
};
-#define AUTOSELECT ((unsigned int)0xFFFFFFFF)
+#define AUTOSELECT 0xFFFFFFFF
#define ZCRYPT_IOCTL_MAGIC 'z'