Patchwork [v2,1/2] crypto: caam - staticize caam_get_era()

login
register
mail settings
Submitter Fabio Estevam
Date April 11, 2018, 1:54 a.m.
Message ID <1523411644-10156-1-git-send-email-festevam@gmail.com>
Download mbox | patch
Permalink /patch/10334735/
State Superseded
Delegated to: Herbert Xu
Headers show

Comments

Fabio Estevam - April 11, 2018, 1:54 a.m.
From: Fabio Estevam <fabio.estevam@nxp.com>

caam_get_era() is only used locally, so do not export this function
and make it static instead.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- None. I previously asked to put the linux-crypto list on Cc

 drivers/crypto/caam/ctrl.c | 3 +--
 drivers/crypto/caam/ctrl.h | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)
Fabio Estevam - April 11, 2018, 1:55 a.m.
On Tue, Apr 10, 2018 at 10:54 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> caam_get_era() is only used locally, so do not export this function
> and make it static instead.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Changes since v1:
> - None. I previously asked to put the linux-crypto list on Cc

Ops, I meant "None. I previously forgot to put the linux-crypto list on Cc"
Horia Geantă - April 11, 2018, 6:57 a.m.
On 4/11/2018 4:54 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> caam_get_era() is only used locally, so do not export this function
> and make it static instead.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

Patch

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index e4cc636..bee690a 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -400,7 +400,7 @@  static void kick_trng(struct platform_device *pdev, int ent_delay)
  * caam_get_era() - Return the ERA of the SEC on SoC, based
  * on "sec-era" propery in the DTS. This property is updated by u-boot.
  **/
-int caam_get_era(void)
+static int caam_get_era(void)
 {
 	struct device_node *caam_node;
 	int ret;
@@ -412,7 +412,6 @@  int caam_get_era(void)
 
 	return ret ? -ENOTSUPP : prop;
 }
-EXPORT_SYMBOL(caam_get_era);
 
 static const struct of_device_id caam_match[] = {
 	{
diff --git a/drivers/crypto/caam/ctrl.h b/drivers/crypto/caam/ctrl.h
index be693a2..f3ecd67 100644
--- a/drivers/crypto/caam/ctrl.h
+++ b/drivers/crypto/caam/ctrl.h
@@ -9,8 +9,6 @@ 
 #define CTRL_H
 
 /* Prototypes for backend-level services exposed to APIs */
-int caam_get_era(void);
-
 extern bool caam_dpaa2;
 
 #endif /* CTRL_H */