Skip to contentSkip to conversation

crypto: axis - hide an unused variable

PATCH In review Arnd Bergmann 3 participants 3 messages Aug 24, 2017 – Sep 22, 2017

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

PATCH 1/1 crypto: axis - hide an unused variable

Without CONFIG_DEBUG_FS, we get a harmless warning:

drivers/crypto/axis/artpec6_crypto.c:352:23: error: 'dbgfs_root' defined but not used [-Werror=unused-variable]

This moves it into the #ifdef that hides the only user.

Fixes a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver")
---
 drivers/crypto/axis/artpec6_crypto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/axis/artpec6_crypto.c +2 -2
index d9fbbf01062b..0f9754e07719 100644
@@ -349,8 +349,6 @@ struct artpec6_crypto_aead_req_ctx {
 /* The crypto framework makes it hard to avoid this global. */
 static struct device *artpec6_crypto_dev;
 
-static struct dentry *dbgfs_root;
-
 #ifdef CONFIG_FAULT_INJECTION
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_status_read);
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_dma_array_full);
@@ -2984,6 +2982,8 @@ struct dbgfs_u32 {
 	char *desc;
 };
 
+static struct dentry *dbgfs_root;
+
 static void artpec6_crypto_init_debugfs(void)
 {
 	dbgfs_root = debugfs_create_dir("artpec6_crypto", NULL);
Signature · 1 line
2.9.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 39 lines

25 aug. 2017 kl. 01:20 skrev Arnd Bergmann <[email protected]>:

Without CONFIG_DEBUG_FS, we get a harmless warning:

drivers/crypto/axis/artpec6_crypto.c:352:23: error: 'dbgfs_root' defined but not used [-Werror=unused-variable]

This moves it into the #ifdef that hides the only user.

Fixes a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver")

---
drivers/crypto/axis/artpec6_crypto.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/axis/artpec6_crypto.c +2 -2
index d9fbbf01062b..0f9754e07719 100644
@@ -349,8 +349,6 @@ struct artpec6_crypto_aead_req_ctx {
 /* The crypto framework makes it hard to avoid this global. */
 static struct device *artpec6_crypto_dev;
 
-static struct dentry *dbgfs_root;
-
 #ifdef CONFIG_FAULT_INJECTION
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_status_read);
 static DECLARE_FAULT_ATTR(artpec6_crypto_fail_dma_array_full);
@@ -2984,6 +2982,8 @@ struct dbgfs_u32 {
  char *desc;
 };
 
+static struct dentry *dbgfs_root;
+
 static void artpec6_crypto_init_debugfs(void)
 {
  dbgfs_root = debugfs_create_dir("artpec6_crypto", NULL);
Signature · 1 line
2.9.0

Thanks,
Lars

maintainer
#2 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

Without CONFIG_DEBUG_FS, we get a harmless warning:

drivers/crypto/axis/artpec6_crypto.c:352:23: error: 'dbgfs_root' defined but not used [-Werror=unused-variable]

This moves it into the #ifdef that hides the only user.

Fixes a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver")

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt