From 7875a7dc0b619c498c797a1587afbb42f0d4440e Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Thu, 30 Jan 2014 03:01:05 +0100
Subject: [PATCH 278/291] cryptodev: drop

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 drivers/staging/crypto/cryptodev/authenc.c | 18 +++++++++---------
 drivers/staging/crypto/cryptodev/ioctl.c   |  8 ++++----
 drivers/staging/crypto/cryptodev/main.c    | 10 +++++-----
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/crypto/cryptodev/authenc.c b/drivers/staging/crypto/cryptodev/authenc.c
index 9d4893f7834b..a18382090649 100644
--- a/drivers/staging/crypto/cryptodev/authenc.c
+++ b/drivers/staging/crypto/cryptodev/authenc.c
@@ -63,8 +63,8 @@ static int get_userbuf_tls(struct csession *ses, struct kernel_crypt_auth_op *kc
 
 	if (ses->alignmask) {
 		if (!IS_ALIGNED((unsigned long)caop->dst, ses->alignmask))
-			dwarning(2, "careful - source address %lx is not %d byte aligned",
-					(unsigned long)caop->dst, ses->alignmask + 1);
+			dwarning(2, "careful - source address %p is not %d byte aligned",
+					caop->dst, ses->alignmask + 1);
 	}
 
 	if (kcaop->dst_len == 0) {
@@ -117,11 +117,11 @@ static int get_userbuf_srtp(struct csession *ses, struct kernel_crypt_auth_op *k
 
 	if (ses->alignmask) {
 		if (!IS_ALIGNED((unsigned long)caop->dst, ses->alignmask))
-			dwarning(2, "careful - source address %lx is not %d byte aligned",
-					(unsigned long)caop->dst, ses->alignmask + 1);
+			dwarning(2, "careful - source address %p is not %d byte aligned",
+					caop->dst, ses->alignmask + 1);
 		if (!IS_ALIGNED((unsigned long)caop->auth_src, ses->alignmask))
-			dwarning(2, "careful - source address %lx is not %d byte aligned",
-					(unsigned long)caop->auth_src, ses->alignmask + 1);
+			dwarning(2, "careful - source address %p is not %d byte aligned",
+					caop->auth_src, ses->alignmask + 1);
 	}
 
 	if (unlikely(kcaop->dst_len == 0 || caop->auth_len == 0)) {
@@ -209,8 +209,8 @@ static int fill_kcaop_from_caop(struct kernel_crypt_auth_op *kcaop, struct fcryp
 	if (caop->iv) {
 		ret = copy_from_user(kcaop->iv, caop->iv, kcaop->ivlen);
 		if (unlikely(ret)) {
-			derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %lx",
-					kcaop->ivlen, ret, (unsigned long)caop->iv);
+			derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p",
+					kcaop->ivlen, ret, caop->iv);
 			ret = -EFAULT;
 			goto out_unlock;
 		}
@@ -310,7 +310,7 @@ static int verify_tls_record_pad(struct scatterlist *dst_sg, int len, int block_
 
 	for (i = 0; i < pad_size; i++)
 		if (pad[i] != pad_size) {
-			derr(1, "Pad size: %d, pad: %d", pad_size, (int)pad[i]);
+			derr(1, "Pad size: %u, pad: %d", pad_size, pad[i]);
 			return -EBADMSG;
 		}
 
diff --git a/drivers/staging/crypto/cryptodev/ioctl.c b/drivers/staging/crypto/cryptodev/ioctl.c
index 0bdaef505a9d..483887034155 100644
--- a/drivers/staging/crypto/cryptodev/ioctl.c
+++ b/drivers/staging/crypto/cryptodev/ioctl.c
@@ -468,7 +468,7 @@ cryptodev_open(struct inode *inode, struct file *filp)
 		if (!tmp)
 			return -ENOMEM;
 		pcr->itemcount++;
-		ddebug(2, "allocated new item at %lx", (unsigned long)tmp);
+		ddebug(2, "allocated new item at %p", tmp);
 		list_add(&tmp->__hook, &pcr->free.list);
 	}
 
@@ -493,7 +493,7 @@ cryptodev_release(struct inode *inode, struct file *filp)
 	list_splice_tail(&pcr->done.list, &pcr->free.list);
 
 	list_for_each_entry_safe(item, item_safe, &pcr->free.list, __hook) {
-		ddebug(2, "freeing item at %lx", (unsigned long)item);
+		ddebug(2, "freeing item at %p", item);
 		list_del(&item->__hook);
 		kfree(item);
 		items_freed++;
@@ -635,8 +635,8 @@ static int fill_kcop_from_cop(struct kernel_crypt_op *kcop, struct fcrypt *fcr)
 	if (cop->iv) {
 		rc = copy_from_user(kcop->iv, cop->iv, kcop->ivlen);
 		if (unlikely(rc)) {
-			derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %lx",
-					kcop->ivlen, rc, (unsigned long)cop->iv);
+			derr(1, "error copying IV (%d bytes), copy_from_user returned %d for address %p",
+					kcop->ivlen, rc, cop->iv);
 			return -EFAULT;
 		}
 	}
diff --git a/drivers/staging/crypto/cryptodev/main.c b/drivers/staging/crypto/cryptodev/main.c
index 6ce0efe37ff7..57e5c38a42f9 100644
--- a/drivers/staging/crypto/cryptodev/main.c
+++ b/drivers/staging/crypto/cryptodev/main.c
@@ -127,7 +127,7 @@ __crypto_run_std(struct csession *ses_ptr, struct crypt_op *cop)
 		size_t current_len = nbytes > bufsize ? bufsize : nbytes;
 
 		if (unlikely(copy_from_user(data, src, current_len))) {
-		        derr(1, "Error copying %d bytes from user address %p.", (int)current_len, src);
+		        derr(1, "Error copying %zu bytes from user address %p.", current_len, src);
 			ret = -EFAULT;
 			break;
 		}
@@ -224,14 +224,14 @@ int crypto_run(struct fcrypt *fcr, struct kernel_crypt_op *kcop)
 	if (likely(cop->len)) {
 		if (cop->flags & COP_FLAG_NO_ZC) {
 			if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->src, ses_ptr->alignmask))) {
-				dwarning(2, "source address %lx is not %d byte aligned - disabling zero copy",
-						(unsigned long)cop->src, ses_ptr->alignmask + 1);
+				dwarning(2, "source address %p is not %d byte aligned - disabling zero copy",
+						cop->src, ses_ptr->alignmask + 1);
 				cop->flags &= ~COP_FLAG_NO_ZC;
 			}
 
 			if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->dst, ses_ptr->alignmask))) {
-				dwarning(2, "destination address %lx is not %d byte aligned - disabling zero copy",
-						(unsigned long)cop->dst, ses_ptr->alignmask + 1);
+				dwarning(2, "destination address %p is not %d byte aligned - disabling zero copy",
+						cop->dst, ses_ptr->alignmask + 1);
 				cop->flags &= ~COP_FLAG_NO_ZC;
 			}
 		}
-- 
2.1.0

