linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: inside-secure - fix unexported warnings
@ 2019-10-16 11:45 Ben Dooks (Codethink)
  2019-10-17 16:53 ` Pascal Van Leeuwen
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-16 11:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks (Codethink), Antoine Tenart, Herbert Xu,
	David S. Miller, linux-crypto, linux-kernel

The safexcel_pci_remove, pcireg_rc and ofreg_rc are
not exported or declared externally so make them static.

This avoids the following sparse warnings:

drivers/crypto/inside-secure/safexcel.c:1760:6: warning: symbol 'safexcel_pci_remove' was not declared. Should it be static?
drivers/crypto/inside-secure/safexcel.c:1794:5: warning: symbol 'pcireg_rc' was not declared. Should it be static?
drivers/crypto/inside-secure/safexcel.c:1797:5: warning: symbol 'ofreg_rc' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/crypto/inside-secure/safexcel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index 4ab1bde8dd9b..223d1bfdc7e6 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -1757,7 +1757,7 @@ static int safexcel_pci_probe(struct pci_dev *pdev,
 	return rc;
 }
 
-void safexcel_pci_remove(struct pci_dev *pdev)
+static void safexcel_pci_remove(struct pci_dev *pdev)
 {
 	struct safexcel_crypto_priv *priv = pci_get_drvdata(pdev);
 	int i;
@@ -1791,10 +1791,10 @@ static struct pci_driver safexcel_pci_driver = {
 
 /* Unfortunately, we have to resort to global variables here */
 #if IS_ENABLED(CONFIG_PCI)
-int pcireg_rc = -EINVAL; /* Default safe value */
+static int pcireg_rc = -EINVAL; /* Default safe value */
 #endif
 #if IS_ENABLED(CONFIG_OF)
-int ofreg_rc = -EINVAL; /* Default safe value */
+static int ofreg_rc = -EINVAL; /* Default safe value */
 #endif
 
 static int __init safexcel_init(void)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] crypto: inside-secure - fix unexported warnings
  2019-10-16 11:45 [PATCH] crypto: inside-secure - fix unexported warnings Ben Dooks (Codethink)
@ 2019-10-17 16:53 ` Pascal Van Leeuwen
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal Van Leeuwen @ 2019-10-17 16:53 UTC (permalink / raw)
  To: Ben Dooks (Codethink), linux-kernel@lists.codethink.co.uk
  Cc: Antoine Tenart, Herbert Xu, David S. Miller,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org


> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org <linux-crypto-owner@vger.kernel.org> On Behalf Of Ben
> Dooks (Codethink)
> Sent: Wednesday, October 16, 2019 1:45 PM
> To: linux-kernel@lists.codethink.co.uk
> Cc: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>; Antoine Tenart
> <antoine.tenart@bootlin.com>; Herbert Xu <herbert@gondor.apana.org.au>; David S. Miller
> <davem@davemloft.net>; linux-crypto@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] crypto: inside-secure - fix unexported warnings
> 
> The safexcel_pci_remove, pcireg_rc and ofreg_rc are
> not exported or declared externally so make them static.
> 
> This avoids the following sparse warnings:
> 
> drivers/crypto/inside-secure/safexcel.c:1760:6: warning: symbol 'safexcel_pci_remove' was not
> declared. Should it be static?
> drivers/crypto/inside-secure/safexcel.c:1794:5: warning: symbol 'pcireg_rc' was not declared.
> Should it be static?
> drivers/crypto/inside-secure/safexcel.c:1797:5: warning: symbol 'ofreg_rc' was not declared.
> Should it be static?
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: Antoine Tenart <antoine.tenart@bootlin.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  drivers/crypto/inside-secure/safexcel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
> index 4ab1bde8dd9b..223d1bfdc7e6 100644
> --- a/drivers/crypto/inside-secure/safexcel.c
> +++ b/drivers/crypto/inside-secure/safexcel.c
> @@ -1757,7 +1757,7 @@ static int safexcel_pci_probe(struct pci_dev *pdev,
>  	return rc;
>  }
> 
> -void safexcel_pci_remove(struct pci_dev *pdev)
> +static void safexcel_pci_remove(struct pci_dev *pdev)
>  {
>  	struct safexcel_crypto_priv *priv = pci_get_drvdata(pdev);
>  	int i;
> @@ -1791,10 +1791,10 @@ static struct pci_driver safexcel_pci_driver = {
> 
>  /* Unfortunately, we have to resort to global variables here */
>  #if IS_ENABLED(CONFIG_PCI)
> -int pcireg_rc = -EINVAL; /* Default safe value */
> +static int pcireg_rc = -EINVAL; /* Default safe value */
>  #endif
>  #if IS_ENABLED(CONFIG_OF)
> -int ofreg_rc = -EINVAL; /* Default safe value */
> +static int ofreg_rc = -EINVAL; /* Default safe value */
>  #endif
> 
>  static int __init safexcel_init(void)
> --
> 2.23.0

Actually those variables have already disappeared from the 
cryptodev tree due to an earlier patch by Arnd.
So this patch won't apply anyway.

I'll see if I can spin a patch that makes safexcel_pci_remove
static.

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-17 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-16 11:45 [PATCH] crypto: inside-secure - fix unexported warnings Ben Dooks (Codethink)
2019-10-17 16:53 ` Pascal Van Leeuwen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).