diff mbox series

[2/4] crypto/fsl: export caam_get_era()

Message ID 20200602220554.22477-3-michael@walle.cc
State New
Headers show
Series crypto/fsl: add RNG support | expand

Commit Message

Michael Walle June 2, 2020, 10:05 p.m. UTC
We need the era in other modules, too. For example, to get the RNG
version.

Signed-off-by: Michael Walle <michael at walle.cc>
---
 drivers/crypto/fsl/sec.c | 2 +-
 include/fsl_sec.h        | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Horia Geanta June 3, 2020, 5:07 p.m. UTC | #1
On 6/3/2020 1:06 AM, Michael Walle wrote:
> We need the era in other modules, too. For example, to get the RNG
> version.
> 
> Signed-off-by: Michael Walle <michael at walle.cc>
Reviewed-by: Horia Geant? <horia.geanta at nxp.com>

Thanks,
Horia
Heinrich Schuchardt June 3, 2020, 5:12 p.m. UTC | #2
On 6/3/20 12:05 AM, Michael Walle wrote:
> We need the era in other modules, too. For example, to get the RNG
> version.
>
> Signed-off-by: Michael Walle <michael at walle.cc>
> ---
>  drivers/crypto/fsl/sec.c | 2 +-
>  include/fsl_sec.h        | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/fsl/sec.c b/drivers/crypto/fsl/sec.c
> index a2c0bfaf44..a2fe5b1cc9 100644
> --- a/drivers/crypto/fsl/sec.c
> +++ b/drivers/crypto/fsl/sec.c
> @@ -98,7 +98,7 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
>  		       fdt_strerror(err));
>  }
>  #elif CONFIG_SYS_FSL_SEC_COMPAT >= 4  /* SEC4 */
> -static u8 caam_get_era(void)
> +u8 caam_get_era(void)
>  {
>  	static const struct {
>  		u16 ip_id;
> diff --git a/include/fsl_sec.h b/include/fsl_sec.h
> index c0d2c7e866..2ebb75c9b2 100644
> --- a/include/fsl_sec.h
> +++ b/include/fsl_sec.h
> @@ -316,6 +316,8 @@ int blob_dek(const u8 *src, u8 *dst, u8 len);
>  int sec_init_idx(uint8_t);
>  #endif
>  int sec_init(void);
> +

Exported functions should be documented. See
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#function-documentation

> +u8 caam_get_era(void);
>  #endif
>
>  #endif /* __FSL_SEC_H */
>
diff mbox series

Patch

diff --git a/drivers/crypto/fsl/sec.c b/drivers/crypto/fsl/sec.c
index a2c0bfaf44..a2fe5b1cc9 100644
--- a/drivers/crypto/fsl/sec.c
+++ b/drivers/crypto/fsl/sec.c
@@ -98,7 +98,7 @@  void fdt_fixup_crypto_node(void *blob, int sec_rev)
 		       fdt_strerror(err));
 }
 #elif CONFIG_SYS_FSL_SEC_COMPAT >= 4  /* SEC4 */
-static u8 caam_get_era(void)
+u8 caam_get_era(void)
 {
 	static const struct {
 		u16 ip_id;
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index c0d2c7e866..2ebb75c9b2 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -316,6 +316,8 @@  int blob_dek(const u8 *src, u8 *dst, u8 len);
 int sec_init_idx(uint8_t);
 #endif
 int sec_init(void);
+
+u8 caam_get_era(void);
 #endif
 
 #endif /* __FSL_SEC_H */