aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_api.c
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2008-07-14 03:59:27 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2008-07-14 04:02:19 -0400
commit1a89dd8f0b4d7eca2dd4abffb736f37676e1b073 (patch)
tree138a60d59cad4c0f4e4ef287c5754b1f550b920f /drivers/s390/crypto/zcrypt_api.c
parent26348f78e84613371eb657ca1e584153ccb7d596 (diff)
[S390] Cleanup zcrypt printk messages.
Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.c')
-rw-r--r--drivers/s390/crypto/zcrypt_api.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index 4d36e805a234..8a4964f3584b 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -1068,10 +1068,8 @@ static int zcrypt_status_write(struct file *file, const char __user *buffer,
1068 1068
1069#define LBUFSIZE 1200UL 1069#define LBUFSIZE 1200UL
1070 lbuf = kmalloc(LBUFSIZE, GFP_KERNEL); 1070 lbuf = kmalloc(LBUFSIZE, GFP_KERNEL);
1071 if (!lbuf) { 1071 if (!lbuf)
1072 PRINTK("kmalloc failed!\n");
1073 return 0; 1072 return 0;
1074 }
1075 1073
1076 local_count = min(LBUFSIZE - 1, count); 1074 local_count = min(LBUFSIZE - 1, count);
1077 if (copy_from_user(lbuf, buffer, local_count) != 0) { 1075 if (copy_from_user(lbuf, buffer, local_count) != 0) {
@@ -1081,23 +1079,15 @@ static int zcrypt_status_write(struct file *file, const char __user *buffer,
1081 lbuf[local_count] = '\0'; 1079 lbuf[local_count] = '\0';
1082 1080
1083 ptr = strstr(lbuf, "Online devices"); 1081 ptr = strstr(lbuf, "Online devices");
1084 if (!ptr) { 1082 if (!ptr)
1085 PRINTK("Unable to parse data (missing \"Online devices\")\n");
1086 goto out; 1083 goto out;
1087 }
1088 ptr = strstr(ptr, "\n"); 1084 ptr = strstr(ptr, "\n");
1089 if (!ptr) { 1085 if (!ptr)
1090 PRINTK("Unable to parse data (missing newline "
1091 "after \"Online devices\")\n");
1092 goto out; 1086 goto out;
1093 }
1094 ptr++; 1087 ptr++;
1095 1088
1096 if (strstr(ptr, "Waiting work element counts") == NULL) { 1089 if (strstr(ptr, "Waiting work element counts") == NULL)
1097 PRINTK("Unable to parse data (missing "
1098 "\"Waiting work element counts\")\n");
1099 goto out; 1090 goto out;
1100 }
1101 1091
1102 for (j = 0; j < 64 && *ptr; ptr++) { 1092 for (j = 0; j < 64 && *ptr; ptr++) {
1103 /* 1093 /*
@@ -1197,16 +1187,12 @@ int __init zcrypt_api_init(void)
1197 1187
1198 /* Register the request sprayer. */ 1188 /* Register the request sprayer. */
1199 rc = misc_register(&zcrypt_misc_device); 1189 rc = misc_register(&zcrypt_misc_device);
1200 if (rc < 0) { 1190 if (rc < 0)
1201 PRINTKW(KERN_ERR "misc_register (minor %d) failed with %d\n",
1202 zcrypt_misc_device.minor, rc);
1203 goto out; 1191 goto out;
1204 }
1205 1192
1206 /* Set up the proc file system */ 1193 /* Set up the proc file system */
1207 zcrypt_entry = create_proc_entry("driver/z90crypt", 0644, NULL); 1194 zcrypt_entry = create_proc_entry("driver/z90crypt", 0644, NULL);
1208 if (!zcrypt_entry) { 1195 if (!zcrypt_entry) {
1209 PRINTK("Couldn't create z90crypt proc entry\n");
1210 rc = -ENOMEM; 1196 rc = -ENOMEM;
1211 goto out_misc; 1197 goto out_misc;
1212 } 1198 }