From 6b3ca0a81723290e2d9b33c406c0e65c1870baa8 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Tue, 13 Dec 2022 10:51:56 +0100 Subject: [PATCH] fix(st-crypto): remove platdata functions The functions stm32_pka_get_platdata() and stm32_saes_get_platdata() are not used. They can be removed as we always use DT to retrieve the device configuration. This issue was triggered by sparse tool or when enabling warning -Wmissing-prototypes. Signed-off-by: Yann Gautier Change-Id: I5cce9a0765144d694e8ddece37361ccbb85d1734 --- drivers/st/crypto/stm32_pka.c | 12 +----------- drivers/st/crypto/stm32_saes.c | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/st/crypto/stm32_pka.c b/drivers/st/crypto/stm32_pka.c index e03cf0f42..2bbb31dc5 100644 --- a/drivers/st/crypto/stm32_pka.c +++ b/drivers/st/crypto/stm32_pka.c @@ -254,13 +254,6 @@ static const struct curve_parameters curve_def[] = { static struct stm32_pka_platdata pka_pdata; -#pragma weak stm32_pka_get_platdata - -int stm32_pka_get_platdata(struct stm32_pka_platdata *pdata) -{ - return -ENODEV; -} - static int stm32_pka_parse_fdt(void) { int node; @@ -583,10 +576,7 @@ int stm32_pka_init(void) err = stm32_pka_parse_fdt(); if (err != 0) { - err = stm32_pka_get_platdata(&pka_pdata); - if (err != 0) { - return err; - } + return err; } clk_enable(pka_pdata.clock_id); diff --git a/drivers/st/crypto/stm32_saes.c b/drivers/st/crypto/stm32_saes.c index 02baf2127..f4da571fb 100644 --- a/drivers/st/crypto/stm32_saes.c +++ b/drivers/st/crypto/stm32_saes.c @@ -139,15 +139,8 @@ #define SET_CHAINING_MODE(mod, cr) \ mmio_clrsetbits_32((cr), _SAES_CR_CHMOD_MASK, _SAES_CR_CHMOD_##mod << _SAES_CR_CHMOD_SHIFT) -#define pragma weak stm32_saes_get_platdata - static struct stm32_saes_platdata saes_pdata; -int stm32_saes_get_platdata(struct stm32_saes_platdata *pdata) -{ - return -ENODEV; -} - static int stm32_saes_parse_fdt(struct stm32_saes_platdata *pdata) { int node; @@ -389,10 +382,7 @@ int stm32_saes_driver_init(void) err = stm32_saes_parse_fdt(&saes_pdata); if (err != 0) { - err = stm32_saes_get_platdata(&saes_pdata); - if (err != 0) { - return err; - } + return err; } clk_enable(saes_pdata.clock_id);