summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch')
-rw-r--r--recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch b/recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch
new file mode 100644
index 0000000..b0fcf0f
--- /dev/null
+++ b/recipes-kernel/cryptodev/sdk_patches/0018-fix-compat-warnings.patch
@@ -0,0 +1,64 @@
1From 596378a22532908487f2c5e4d717c5ae618c4c7d Mon Sep 17 00:00:00 2001
2From: Tudor Ambarus <tudor.ambarus@freescale.com>
3Date: Tue, 2 Jun 2015 10:44:12 +0300
4Subject: [PATCH 18/38] fix compat warnings
5
6 CC [M] crypto/../../cryptodev-linux/ioctl.o
7crypto/../../cryptodev-linux/ioctl.c: In function 'compat_to_crypt_kop':
8crypto/../../cryptodev-linux/ioctl.c:1161:14: warning: assignment makes pointer from integer without a cast
9 kop->cookie = compat->cookie;
10 ^
11crypto/../../cryptodev-linux/ioctl.c: In function 'crypt_kop_to_compat':
12crypto/../../cryptodev-linux/ioctl.c:1191:17: warning: assignment makes integer from pointer without a cast
13 compat->cookie = kop->cookie;
14 ^
15crypto/../../cryptodev-linux/ioctl.c: In function 'cryptodev_compat_ioctl':
16crypto/../../cryptodev-linux/ioctl.c:1430:28: warning: assignment makes integer from pointer without a cast
17 cookie_list.cookie[i] =
18 ^
19
20Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com>
21Change-Id: Id851408c0c743c01447f3b0ced38fbc1ae94d4db
22Reviewed-on: http://git.am.freescale.net:8181/37442
23Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com>
24Tested-by: Cristian Stoica <cristian.stoica@freescale.com>
25---
26 ioctl.c | 8 ++++----
27 1 file changed, 4 insertions(+), 4 deletions(-)
28
29diff --git a/ioctl.c b/ioctl.c
30index 39635a4..f3ce2f6 100644
31--- a/ioctl.c
32+++ b/ioctl.c
33@@ -1148,7 +1148,7 @@ static inline void compat_to_crypt_kop(struct compat_crypt_kop *compat,
34 }
35
36 kop->curve_type = compat->curve_type;
37- kop->cookie = compat->cookie;
38+ kop->cookie = compat_ptr(compat->cookie);
39 }
40
41 static int compat_kop_from_user(struct kernel_crypt_kop *kop,
42@@ -1178,7 +1178,7 @@ static inline void crypt_kop_to_compat(struct crypt_kop *kop,
43 ptr_to_compat(kop->crk_param[i].crp_p);
44 compat->crk_param[i].crp_nbits = kop->crk_param[i].crp_nbits;
45 }
46- compat->cookie = kop->cookie;
47+ compat->cookie = ptr_to_compat(kop->cookie);
48 compat->curve_type = kop->curve_type;
49 }
50
51@@ -1405,8 +1405,8 @@ cryptodev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg_)
52 ret = crypto_async_fetch_asym(pkc);
53 if (!ret) {
54 cookie_list.cookie_available++;
55- cookie_list.cookie[i] =
56- pkc->kop.kop.cookie;
57+ cookie_list.cookie[i] = ptr_to_compat(
58+ pkc->kop.kop.cookie);
59 }
60 kfree(pkc);
61 } else {
62--
632.7.0
64