nvme-auth: set nvme_auth_wq storage-class-specifier to static
Subsystems (2)
PATCH 1/1 nvme-auth: set nvme_auth_wq storage-class-specifier to static
smatch reportsdrivers/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 <[email protected]>
--- drivers/nvme/host/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
Signature · 1 line
2.26.3
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_wqis only used inauth.c, so it should be static.Signed-off-by Tom Rix <[email protected]>--- drivers/nvme/host/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/host/auth.c +0
-0
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.
Reviewed-by Chaitanya Kulkarni <[email protected]>
-ck
Thanks,
applied to nvme-6.2.