diff options
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0019-fix-size_t-print-format.patch')
-rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0019-fix-size_t-print-format.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0019-fix-size_t-print-format.patch b/recipes-kernel/cryptodev/sdk_patches/0019-fix-size_t-print-format.patch new file mode 100644 index 0000000..fdf8c5d --- /dev/null +++ b/recipes-kernel/cryptodev/sdk_patches/0019-fix-size_t-print-format.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 1d10f06bef0f07980a08b387850c1daf1d3a8e87 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
3 | Date: Tue, 2 Jun 2015 12:11:12 +0300 | ||
4 | Subject: [PATCH 19/38] fix size_t print format | ||
5 | |||
6 | CC [M] crypto/../../cryptodev-linux/cryptlib.o | ||
7 | crypto/../../cryptodev-linux/cryptlib.c: In function 'cryptodev_cipher_init': | ||
8 | crypto/../../cryptodev-linux/cryptlib.c:146:5: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' [-Wformat=] | ||
9 | ddebug(1, "Wrong keylen '%u' for algorithm '%s'. Use %u to %u.", | ||
10 | ^ | ||
11 | crypto/../../cryptodev-linux/cryptlib.c:173:3: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'size_t' [-Wformat=] | ||
12 | ddebug(1, "Setting key failed for %s-%u.", alg_name, keylen*8); | ||
13 | ^ | ||
14 | crypto/../../cryptodev-linux/cryptlib.c: In function 'cryptodev_hash_init': | ||
15 | crypto/../../cryptodev-linux/cryptlib.c:340:4: warning: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'size_t' [-Wformat=] | ||
16 | ddebug(1, "Setting hmac key failed for %s-%u.", | ||
17 | ^ | ||
18 | |||
19 | Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> | ||
20 | Change-Id: I67f2d79f68b4d62b598073c6a918a110523fadfd | ||
21 | Reviewed-on: http://git.am.freescale.net:8181/37443 | ||
22 | Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
23 | Tested-by: Cristian Stoica <cristian.stoica@freescale.com> | ||
24 | --- | ||
25 | cryptlib.c | 6 +++--- | ||
26 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/cryptlib.c b/cryptlib.c | ||
29 | index 5882a30..10f5e1a 100644 | ||
30 | --- a/cryptlib.c | ||
31 | +++ b/cryptlib.c | ||
32 | @@ -143,7 +143,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, | ||
33 | if (alg->max_keysize > 0 && | ||
34 | unlikely((keylen < alg->min_keysize) || | ||
35 | (keylen > alg->max_keysize))) { | ||
36 | - ddebug(1, "Wrong keylen '%u' for algorithm '%s'. Use %u to %u.", | ||
37 | + ddebug(1, "Wrong keylen '%zu' for algorithm '%s'. Use %u to %u.", | ||
38 | keylen, alg_name, alg->min_keysize, alg->max_keysize); | ||
39 | ret = -EINVAL; | ||
40 | goto error; | ||
41 | @@ -170,7 +170,7 @@ int cryptodev_cipher_init(struct cipher_data *out, const char *alg_name, | ||
42 | } | ||
43 | |||
44 | if (unlikely(ret)) { | ||
45 | - ddebug(1, "Setting key failed for %s-%u.", alg_name, keylen*8); | ||
46 | + ddebug(1, "Setting key failed for %s-%zu.", alg_name, keylen*8); | ||
47 | ret = -EINVAL; | ||
48 | goto error; | ||
49 | } | ||
50 | @@ -337,7 +337,7 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name, | ||
51 | if (hmac_mode != 0) { | ||
52 | ret = crypto_ahash_setkey(hdata->async.s, mackey, mackeylen); | ||
53 | if (unlikely(ret)) { | ||
54 | - ddebug(1, "Setting hmac key failed for %s-%u.", | ||
55 | + ddebug(1, "Setting hmac key failed for %s-%zu.", | ||
56 | alg_name, mackeylen*8); | ||
57 | ret = -EINVAL; | ||
58 | goto error; | ||
59 | -- | ||
60 | 2.7.0 | ||
61 | |||