Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719624 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-08-25 00:30 +0200 |
| Last post | 2017-08-26 10:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] crypto: axis - hide an unused variable Arnd Bergmann <arnd@arndb.de> - 2017-08-25 00:30 +0200
Re: [PATCH] crypto: axis - hide an unused variable Lars Persson <lars.persson@axis.com> - 2017-08-26 10:00 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-08-25 00:30 +0200 |
| Subject | [PATCH] crypto: axis - hide an unused variable |
| Message-ID | <ui8Ns-49D-15@gated-at.bofh.it> |
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/crypto/axis/artpec6_crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
index d9fbbf01062b..0f9754e07719 100644
--- a/drivers/crypto/axis/artpec6_crypto.c
+++ b/drivers/crypto/axis/artpec6_crypto.c
@@ -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);
--
2.9.0
[toc] | [next] | [standalone]
| From | Lars Persson <lars.persson@axis.com> |
|---|---|
| Date | 2017-08-26 10:00 +0200 |
| Message-ID | <uiEaB-6R3-1@gated-at.bofh.it> |
| In reply to | #1719624 |
> 25 aug. 2017 kl. 01:20 skrev Arnd Bergmann <arnd@arndb.de>:
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/crypto/axis/artpec6_crypto.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c
> index d9fbbf01062b..0f9754e07719 100644
> --- a/drivers/crypto/axis/artpec6_crypto.c
> +++ b/drivers/crypto/axis/artpec6_crypto.c
> @@ -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);
> --
> 2.9.0
Acked-by: Lars Persson <larper@axis.com>
Thanks,
Lars
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web