Skip to contentSkip to conversation

crypto: inside-secure - fix unexported warnings

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Oct 16, 2019 – Oct 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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?

---
Cc: Antoine Tenart <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/crypto/inside-secure/safexcel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/inside-secure/safexcel.c +3 -3
index 4ab1bde8dd9b..223d1bfdc7e6 100644
@@ -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)
Signature · 1 line
2.23.0
#1 lore raw
Quoted 61 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ben Dooks (Codethink)
Sent: Wednesday, October 16, 2019 1:45 PM
To: [email protected]
Cc: Ben Dooks (Codethink) <[email protected]>; Antoine Tenart <[email protected]>; Herbert Xu <[email protected]>; David S. Miller <[email protected]>; [email protected]; [email protected]
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?

---
Cc: Antoine Tenart <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/crypto/inside-secure/safexcel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/inside-secure/safexcel.c +3 -4
index 4ab1bde8dd9b..223d1bfdc7e6 100644
@@ -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)
--
Quoted 1 line

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