Skip to contentSkip to conversation

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

PATCH Applied Tom Rix 3 participants 3 messages Feb 6, 2023 – Feb 8, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 nvme-auth: set nvme_auth_wq storage-class-specifier to static

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.

---
 drivers/nvme/host/auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/auth.c +1 -1
index b57630d1d3b8..bdb97496ba2d 100644
@@ -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
Signature · 1 line
2.26.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Tom Rix

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.

---
  drivers/nvme/host/auth.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/auth.c +0 -0
index b57630d1d3b8..bdb97496ba2d 100644

drivers/nvme/host/auth.c struct nvme_dhchap_queue_context { · line 51

Quoted 8 lines
drivers/nvme/host/auth.c +1 -1
@@ -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.

-ck