diff options
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0062-fix-build-warnings-on-implicit-function-declarations.patch')
-rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0062-fix-build-warnings-on-implicit-function-declarations.patch | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0062-fix-build-warnings-on-implicit-function-declarations.patch b/recipes-kernel/cryptodev/sdk_patches/0062-fix-build-warnings-on-implicit-function-declarations.patch deleted file mode 100644 index dba2575f..00000000 --- a/recipes-kernel/cryptodev/sdk_patches/0062-fix-build-warnings-on-implicit-function-declarations.patch +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | From 0fd37b5225bd26182b20588b200a4fc0a3f415e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@nxp.com> | ||
3 | Date: Wed, 26 Oct 2016 10:10:47 +0300 | ||
4 | Subject: [PATCH 062/104] fix build warnings on implicit function declarations | ||
5 | |||
6 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> | ||
7 | --- | ||
8 | tests/Makefile | 2 +- | ||
9 | tests/async_speed.c | 47 +++++++++++++++++++++++------------------------ | ||
10 | tests/hashcrypt_speed.c | 1 + | ||
11 | tests/sha_speed.c | 1 + | ||
12 | tests/speed.c | 1 + | ||
13 | 5 files changed, 27 insertions(+), 25 deletions(-) | ||
14 | |||
15 | diff --git a/tests/Makefile b/tests/Makefile | ||
16 | index 6424c11..14ae2c7 100644 | ||
17 | --- a/tests/Makefile | ||
18 | +++ b/tests/Makefile | ||
19 | @@ -1,5 +1,5 @@ | ||
20 | KERNEL_DIR ?= /lib/modules/$(shell uname -r)/build | ||
21 | -CRYPTODEV_CFLAGS += -DENABLE_ASYNC | ||
22 | +CRYPTODEV_CFLAGS += -DENABLE_ASYNC -Wimplicit-function-declaration | ||
23 | KBUILD_CFLAGS += -I.. $(CRYPTODEV_CFLAGS) | ||
24 | CFLAGS += -I.. $(CRYPTODEV_CFLAGS) | ||
25 | |||
26 | diff --git a/tests/async_speed.c b/tests/async_speed.c | ||
27 | index e6bbeed..a1a1b7e 100644 | ||
28 | --- a/tests/async_speed.c | ||
29 | +++ b/tests/async_speed.c | ||
30 | @@ -112,6 +112,29 @@ static void value2machine(uint64_t bytes, double time, double* speed) | ||
31 | *speed = bytes / time; | ||
32 | } | ||
33 | |||
34 | +int get_alignmask(int fdc, struct session_op *sess) | ||
35 | +{ | ||
36 | + int alignmask; | ||
37 | + int min_alignmask = sizeof(void*) - 1; | ||
38 | + | ||
39 | +#ifdef CIOCGSESSINFO | ||
40 | + struct session_info_op siop; | ||
41 | + | ||
42 | + siop.ses = sess->ses; | ||
43 | + if (ioctl(fdc, CIOCGSESSINFO, &siop)) { | ||
44 | + perror("ioctl(CIOCGSESSINFO)"); | ||
45 | + return -EINVAL; | ||
46 | + } | ||
47 | + alignmask = siop.alignmask; | ||
48 | + if (alignmask < min_alignmask) { | ||
49 | + alignmask = min_alignmask; | ||
50 | + } | ||
51 | +#else | ||
52 | + alignmask = 0; | ||
53 | +#endif | ||
54 | + | ||
55 | + return alignmask; | ||
56 | +} | ||
57 | |||
58 | int encrypt_data(int fdc, struct test_params tp, struct session_op *sess) | ||
59 | { | ||
60 | @@ -236,30 +259,6 @@ int run_test(int id, struct test_params tp) | ||
61 | close(fd); | ||
62 | } | ||
63 | |||
64 | -int get_alignmask(int fdc, struct session_op *sess) | ||
65 | -{ | ||
66 | - int alignmask; | ||
67 | - int min_alignmask = sizeof(void*) - 1; | ||
68 | - | ||
69 | -#ifdef CIOCGSESSINFO | ||
70 | - struct session_info_op siop; | ||
71 | - | ||
72 | - siop.ses = sess->ses; | ||
73 | - if (ioctl(fdc, CIOCGSESSINFO, &siop)) { | ||
74 | - perror("ioctl(CIOCGSESSINFO)"); | ||
75 | - return -EINVAL; | ||
76 | - } | ||
77 | - alignmask = siop.alignmask; | ||
78 | - if (alignmask < min_alignmask) { | ||
79 | - alignmask = min_alignmask; | ||
80 | - } | ||
81 | -#else | ||
82 | - alignmask = 0; | ||
83 | -#endif | ||
84 | - | ||
85 | - return alignmask; | ||
86 | -} | ||
87 | - | ||
88 | void do_test_vectors(int fdc, struct test_params tp, struct session_op *sess) | ||
89 | { | ||
90 | int i; | ||
91 | diff --git a/tests/hashcrypt_speed.c b/tests/hashcrypt_speed.c | ||
92 | index e60b73d..045bf8e 100644 | ||
93 | --- a/tests/hashcrypt_speed.c | ||
94 | +++ b/tests/hashcrypt_speed.c | ||
95 | @@ -25,6 +25,7 @@ | ||
96 | #include <sys/time.h> | ||
97 | #include <sys/types.h> | ||
98 | #include <signal.h> | ||
99 | +#include <unistd.h> | ||
100 | #include <crypto/cryptodev.h> | ||
101 | |||
102 | #define MAX(x,y) ((x)>(y)?(x):(y)) | ||
103 | diff --git a/tests/sha_speed.c b/tests/sha_speed.c | ||
104 | index 75d0f42..e5c6efe 100644 | ||
105 | --- a/tests/sha_speed.c | ||
106 | +++ b/tests/sha_speed.c | ||
107 | @@ -25,6 +25,7 @@ | ||
108 | #include <sys/time.h> | ||
109 | #include <sys/types.h> | ||
110 | #include <signal.h> | ||
111 | +#include <unistd.h> | ||
112 | |||
113 | #include <crypto/cryptodev.h> | ||
114 | |||
115 | diff --git a/tests/speed.c b/tests/speed.c | ||
116 | index 0b14c88..d2e1aed 100644 | ||
117 | --- a/tests/speed.c | ||
118 | +++ b/tests/speed.c | ||
119 | @@ -24,6 +24,7 @@ | ||
120 | #include <sys/time.h> | ||
121 | #include <sys/types.h> | ||
122 | #include <signal.h> | ||
123 | +#include <unistd.h> | ||
124 | |||
125 | #include <crypto/cryptodev.h> | ||
126 | |||
127 | -- | ||
128 | 2.10.2 | ||
129 | |||