1 From 6e88098ca43a3d80ae86908f7badba683c8a0d84 Mon Sep 17 00:00:00 2001
2 From: Corentin Labbe <clabbe@baylibre.com>
3 Date: Wed, 23 Jan 2019 11:24:18 +0000
4 Subject: [PATCH 07/15] crypto: crypto4xx - Fix wrong
5 ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
7 When building without CONFIG_HW_RANDOM_PPC4XX, I hit the following build failure:
8 drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_probe':
9 drivers/crypto/amcc/crypto4xx_core.c:1407:20: error: passing argument 1 of 'ppc4xx_trng_probe' from incompatible pointer type [-Werror=incompatible-pointer-types]
10 In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
11 drivers/crypto/amcc/crypto4xx_trng.h:28:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
12 drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_remove':
13 drivers/crypto/amcc/crypto4xx_core.c:1434:21: error: passing argument 1 of 'ppc4xx_trng_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
14 In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
15 drivers/crypto/amcc/crypto4xx_trng.h:30:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
17 This patch fix the needed argument of ppc4xx_trng_probe()/ppc4xx_trng_remove() in that case.
19 Fixes: 5343e674f32f ("crypto4xx: integrate ppc4xx-rng into crypto4xx")
20 Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
21 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
23 drivers/crypto/amcc/crypto4xx_trng.h | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
26 --- a/drivers/crypto/amcc/crypto4xx_trng.h
27 +++ b/drivers/crypto/amcc/crypto4xx_trng.h
28 @@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_
29 void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev);
31 static inline void ppc4xx_trng_probe(
32 - struct crypto4xx_device *dev __maybe_unused) { }
33 + struct crypto4xx_core_device *dev __maybe_unused) { }
34 static inline void ppc4xx_trng_remove(
35 - struct crypto4xx_device *dev __maybe_unused) { }
36 + struct crypto4xx_core_device *dev __maybe_unused) { }