From 88236d7e751e4410b0eac9b4845578a7954e2f8d Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil.sutter@viprinet.com>
Date: Tue, 15 Jun 2010 18:24:16 +0200
Subject: [PATCH 043/291] cryptodev: whitespace

---
 drivers/staging/crypto/cryptodev/cryptodev.h       |  6 ++---
 .../staging/crypto/cryptodev/cryptodev_cipher.c    | 26 +++++++++++-----------
 drivers/staging/crypto/cryptodev/cryptodev_int.h   |  2 +-
 drivers/staging/crypto/cryptodev/cryptodev_main.c  | 12 +++++-----
 4 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/crypto/cryptodev/cryptodev.h b/drivers/staging/crypto/cryptodev/cryptodev.h
index fc9414905d28..f7493112aa74 100644
--- a/drivers/staging/crypto/cryptodev/cryptodev.h
+++ b/drivers/staging/crypto/cryptodev/cryptodev.h
@@ -39,7 +39,7 @@ typedef enum {
 	CRYPTO_SHA2_512_HMAC=20,
 	CRYPTO_AES_CTR=21,
 	CRYPTO_AES_XTS=22,
-	
+
 	CRYPTO_CAMELLIA_CBC=101,
 	CRYPTO_RIPEMD160,
 	CRYPTO_SHA2_256,
@@ -53,7 +53,7 @@ typedef enum {
 #define DES_BLOCK_LEN		8
 #define DES3_BLOCK_LEN		8
 #define RIJNDAEL128_BLOCK_LEN	16
-#define AES_BLOCK_LEN 		RIJNDAEL128_BLOCK_LEN
+#define AES_BLOCK_LEN		RIJNDAEL128_BLOCK_LEN
 #define CAMELLIA_BLOCK_LEN
 #define BLOWFISH_BLOCK_LEN	8
 #define SKIPJACK_BLOCK_LEN	8
@@ -141,7 +141,7 @@ typedef enum {
 #define CRF_DH_COMPUTE_KEY	(1 << CRK_DH_COMPUTE_KEY)
 
 
-/* ioctl's. Compatible with old linux cryptodev.h 
+/* ioctl's. Compatible with old linux cryptodev.h
  */
 #define CRIOGET         _IOWR('c', 101, uint32_t)
 #define CIOCGSESSION    _IOWR('c', 102, struct session_op)
diff --git a/drivers/staging/crypto/cryptodev/cryptodev_cipher.c b/drivers/staging/crypto/cryptodev/cryptodev_cipher.c
index 24368032b46d..25ef44e4ea6c 100644
--- a/drivers/staging/crypto/cryptodev/cryptodev_cipher.c
+++ b/drivers/staging/crypto/cryptodev/cryptodev_cipher.c
@@ -74,7 +74,7 @@ int cryptodev_cipher_init(struct cipher_data* out, const char* alg_name, uint8_t
 	}
 
 	alg = crypto_ablkcipher_alg(out->async.s);
-	
+
 	if (alg != NULL) {
 		/* Was correct key length supplied? */
 		if (alg->max_keysize > 0 && unlikely((keylen < alg->min_keysize) ||
@@ -122,7 +122,7 @@ error:
 	crypto_free_ablkcipher(out->async.s);
 	kfree(out->async.result);
 	ablkcipher_request_free(out->async.request);
-	
+
 	return ret;
 }
 
@@ -163,26 +163,26 @@ static inline int waitfor (struct cryptodev_result* cr, ssize_t ret)
 	default:
 		return ret;
 	}
-	
+
 	return 0;
 }
 
 ssize_t cryptodev_cipher_encrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
 {
 	int ret;
-	
+
 	INIT_COMPLETION(cdata->async.result->completion);
 	ablkcipher_request_set_crypt(cdata->async.request, sg1, sg2,
 			len, cdata->async.iv);
 	ret = crypto_ablkcipher_encrypt(cdata->async.request);
-	
+
 	return waitfor(cdata->async.result,ret);
 }
 
 ssize_t cryptodev_cipher_decrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
 {
 	int ret;
-	
+
 	INIT_COMPLETION(cdata->async.result->completion);
 	ablkcipher_request_set_crypt(cdata->async.request, sg1, sg2,
 			len, cdata->async.iv);
@@ -206,7 +206,7 @@ uint8_t hkeyp[CRYPTO_HMAC_MAX_KEY_LEN];
 		return -EINVAL;
 	}
 	copy_from_user(hkeyp, mackey, mackeylen);
-	
+
 	hdata->async.s = crypto_alloc_ahash(alg_name, 0, 0);
 	if (unlikely(IS_ERR(hdata->async.s))) {
 		dprintk(1,KERN_DEBUG,"%s: Failed to load transform for %s\n", __func__,
@@ -270,7 +270,7 @@ int ret;
 			"error in crypto_hash_init()\n");
 		return ret;
 	}
-	
+
 	return 0;
 
 }
@@ -282,9 +282,9 @@ ssize_t cryptodev_hash_update( struct hash_data* hdata, struct scatterlist *sg,
 	INIT_COMPLETION(hdata->async.result->completion);
 	ahash_request_set_crypt(hdata->async.request, sg, NULL,
 			len);
-	
+
 	ret = crypto_ahash_update(hdata->async.request);
-	
+
 	return waitfor(hdata->async.result,ret);
 }
 
@@ -292,11 +292,11 @@ ssize_t cryptodev_hash_update( struct hash_data* hdata, struct scatterlist *sg,
 int cryptodev_hash_final( struct hash_data* hdata, void* output)
 {
 	int ret;
-	
+
 	INIT_COMPLETION(hdata->async.result->completion);
 	ahash_request_set_crypt(hdata->async.request, NULL, output, 0);
-	
+
 	ret = crypto_ahash_final(hdata->async.request);
-	
+
 	return waitfor(hdata->async.result,ret);
 }
diff --git a/drivers/staging/crypto/cryptodev/cryptodev_int.h b/drivers/staging/crypto/cryptodev/cryptodev_int.h
index 19cd6a3363c8..bad332ca33b1 100644
--- a/drivers/staging/crypto/cryptodev/cryptodev_int.h
+++ b/drivers/staging/crypto/cryptodev/cryptodev_int.h
@@ -14,7 +14,7 @@
 
 #define PFX "cryptodev: "
 #define dprintk(level,severity,format,a...)			\
-	do { 							\
+	do {						\
 		if (level <= cryptodev_verbosity)				\
 			printk(severity PFX "%s[%u]: " format,	\
 			       current->comm, current->pid,	\
diff --git a/drivers/staging/crypto/cryptodev/cryptodev_main.c b/drivers/staging/crypto/cryptodev/cryptodev_main.c
index f5a2635e3dd4..d462a08a87ed 100644
--- a/drivers/staging/crypto/cryptodev/cryptodev_main.c
+++ b/drivers/staging/crypto/cryptodev/cryptodev_main.c
@@ -200,7 +200,7 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop)
 			goto error;
 		}
 	}
-	
+
 	if (hash_name) {
 		ret = cryptodev_hash_init(&ses_new->hdata, hash_name, hmac_mode, sop->mackey, sop->mackeylen);
 		if (ret != 0) {
@@ -370,7 +370,7 @@ crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
 	bufsize = PAGE_SIZE < nbytes ? PAGE_SIZE : nbytes;
 
 	nbytes = cop->len;
-	
+
 	if (ses_ptr->hdata.init != 0) {
 		ret = cryptodev_hash_reset(&ses_ptr->hdata);
 		if (unlikely(ret)) {
@@ -455,7 +455,7 @@ crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
 		nbytes -= current_len;
 		src += current_len;
 	}
-	
+
 	if (ses_ptr->hdata.init != 0) {
 		ret = cryptodev_hash_final(&ses_ptr->hdata, hash_output);
 		if (unlikely(ret)) {
@@ -514,7 +514,7 @@ cryptodev_release(struct inode *inode, struct file *filp)
 		kfree(fcr);
 		filp->private_data = NULL;
 	}
-	
+
 	return 0;
 }
 
@@ -555,7 +555,7 @@ cryptodev_ioctl(struct inode *inode, struct file *filp,
 			fd = clonefd(filp);
 			put_user(fd, p);
 			return 0;
-			
+
 		case CIOCGSESSION:
 			copy_from_user(&sop, (void*)arg, sizeof(sop));
 			ret = crypto_create_session(fcr, &sop);
@@ -713,7 +713,7 @@ cryptodev_deregister(void)
 int __init init_cryptodev(void)
 {
 	int rc;
-	
+
 	rc = cryptodev_register();
 	if (unlikely(rc))
 		return rc;
-- 
2.1.0

