diff options
Diffstat (limited to 'meta-fsl-ppc/recipes-kernel/cryptodev/files/0018-fix-compat-warnings.patch')
-rw-r--r-- | meta-fsl-ppc/recipes-kernel/cryptodev/files/0018-fix-compat-warnings.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-fsl-ppc/recipes-kernel/cryptodev/files/0018-fix-compat-warnings.patch b/meta-fsl-ppc/recipes-kernel/cryptodev/files/0018-fix-compat-warnings.patch new file mode 100644 index 00000000..bf93f5b1 --- /dev/null +++ b/meta-fsl-ppc/recipes-kernel/cryptodev/files/0018-fix-compat-warnings.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 596378a22532908487f2c5e4d717c5ae618c4c7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
3 | Date: Tue, 2 Jun 2015 10:44:12 +0300 | ||
4 | Subject: [PATCH 18/20] fix compat warnings | ||
5 | |||
6 | CC [M] crypto/../../cryptodev-linux/ioctl.o | ||
7 | crypto/../../cryptodev-linux/ioctl.c: In function 'compat_to_crypt_kop': | ||
8 | crypto/../../cryptodev-linux/ioctl.c:1161:14: warning: assignment makes pointer from integer without a cast | ||
9 | kop->cookie = compat->cookie; | ||
10 | ^ | ||
11 | crypto/../../cryptodev-linux/ioctl.c: In function 'crypt_kop_to_compat': | ||
12 | crypto/../../cryptodev-linux/ioctl.c:1191:17: warning: assignment makes integer from pointer without a cast | ||
13 | compat->cookie = kop->cookie; | ||
14 | ^ | ||
15 | crypto/../../cryptodev-linux/ioctl.c: In function 'cryptodev_compat_ioctl': | ||
16 | crypto/../../cryptodev-linux/ioctl.c:1430:28: warning: assignment makes integer from pointer without a cast | ||
17 | cookie_list.cookie[i] = | ||
18 | ^ | ||
19 | |||
20 | Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
21 | Change-Id: Id851408c0c743c01447f3b0ced38fbc1ae94d4db | ||
22 | Reviewed-on: http://git.am.freescale.net:8181/37442 | ||
23 | Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
24 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
25 | --- | ||
26 | ioctl.c | 8 ++++---- | ||
27 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
28 | |||
29 | diff --git a/ioctl.c b/ioctl.c | ||
30 | index 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 | -- | ||
63 | 2.3.5 | ||
64 | |||