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
6 Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
9 tests/async_speed.c | 47 +++++++++++++++++++++++------------------------
10 tests/hashcrypt_speed.c | 1 +
11 tests/sha_speed.c | 1 +
13 5 files changed, 27 insertions(+), 25 deletions(-)
15 diff --git a/tests/Makefile b/tests/Makefile
16 index 6424c11..14ae2c7 100644
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)
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;
34 +int get_alignmask(int fdc, struct session_op *sess)
37 + int min_alignmask = sizeof(void*) - 1;
40 + struct session_info_op siop;
42 + siop.ses = sess->ses;
43 + if (ioctl(fdc, CIOCGSESSINFO, &siop)) {
44 + perror("ioctl(CIOCGSESSINFO)");
47 + alignmask = siop.alignmask;
48 + if (alignmask < min_alignmask) {
49 + alignmask = min_alignmask;
58 int encrypt_data(int fdc, struct test_params tp, struct session_op *sess)
60 @@ -236,30 +259,6 @@ int run_test(int id, struct test_params tp)
64 -int get_alignmask(int fdc, struct session_op *sess)
67 - int min_alignmask = sizeof(void*) - 1;
70 - struct session_info_op siop;
72 - siop.ses = sess->ses;
73 - if (ioctl(fdc, CIOCGSESSINFO, &siop)) {
74 - perror("ioctl(CIOCGSESSINFO)");
77 - alignmask = siop.alignmask;
78 - if (alignmask < min_alignmask) {
79 - alignmask = min_alignmask;
88 void do_test_vectors(int fdc, struct test_params tp, struct session_op *sess)
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
97 #include <sys/types.h>
100 #include <crypto/cryptodev.h>
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
108 #include <sys/time.h>
109 #include <sys/types.h>
113 #include <crypto/cryptodev.h>
115 diff --git a/tests/speed.c b/tests/speed.c
116 index 0b14c88..d2e1aed 100644
120 #include <sys/time.h>
121 #include <sys/types.h>
125 #include <crypto/cryptodev.h>