nvme-auth: set nvme_auth_wq storage-class-specifier to static

Message ID 20230206145700.1798073-1-trix@redhat.com
State New
Headers
Series nvme-auth: set nvme_auth_wq storage-class-specifier to static |

Commit Message

Tom Rix Feb. 6, 2023, 2:57 p.m. UTC
  smatch reports
drivers/nvme/host/auth.c:48:25: warning: symbol 'nvme_auth_wq' was not declared. Should it be static?

nvme_auth_wq is only used in auth.c, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/nvme/host/auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Chaitanya Kulkarni Feb. 6, 2023, 3:26 p.m. UTC | #1
On 2/6/23 06:57, Tom Rix wrote:
> smatch reports
> drivers/nvme/host/auth.c:48:25: warning: symbol 'nvme_auth_wq' was not declared. Should it be static?
> 
> nvme_auth_wq is only used in auth.c, so it should be static.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>   drivers/nvme/host/auth.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
> index b57630d1d3b8..bdb97496ba2d 100644
> --- a/drivers/nvme/host/auth.c
> +++ b/drivers/nvme/host/auth.c
> @@ -45,7 +45,7 @@ struct nvme_dhchap_queue_context {
>   	int sess_key_len;
>   };
>   
> -struct workqueue_struct *nvme_auth_wq;
> +static struct workqueue_struct *nvme_auth_wq;
>   
>   #define nvme_auth_flags_from_qid(qid) \
>   	(qid == 0) ? 0 : BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_RESERVED

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
  
Christoph Hellwig Feb. 8, 2023, 6:28 a.m. UTC | #2
Thanks,

applied to nvme-6.2.
  

Patch

diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index b57630d1d3b8..bdb97496ba2d 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -45,7 +45,7 @@  struct nvme_dhchap_queue_context {
 	int sess_key_len;
 };
 
-struct workqueue_struct *nvme_auth_wq;
+static struct workqueue_struct *nvme_auth_wq;
 
 #define nvme_auth_flags_from_qid(qid) \
 	(qid == 0) ? 0 : BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_RESERVED