nvmet: auth: Avoid sparse warning in nvmet_auth_sq_free()
Subsystems (3)
PATCH 1/1 nvmet: auth: Avoid sparse warning in nvmet_auth_sq_free()
When compiling with C=1, the following sparse warning is generated:
auth.c:243:23: warning: Using plain integer as NULL pointer
Avoid this warning by using NULL to instead of 0 to set the sq tls_key pointer.
--- drivers/nvme/target/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/auth.c +1 -1
@@ -240,7 +240,7 @@ void nvmet_auth_sq_free(struct nvmet_sq *sq) {cancel_delayed_work (&sq->auth_expired_work);#ifdef CONFIG_NVME_TARGET_TCP_TLS - sq->tls_key =0 ; + sq->tls_key =NULL ;#endif kfree (sq->dhchap_c1); sq->dhchap_c1 =NULL ;
Signature · 1 line
2.49.0
Quoted 18 lines · Damien Le Moal
When compiling with C=1, the following sparse warning is generated:
auth.c:243:23: warning: Using plain integer as NULL pointer
Avoid this warning by using NULL to instead of 0 to set the sq
tls_keypointer.Fixes fa2e0f8bbc68 ("nvmet-tcp: support secure channel concatenation")Signed-off-by Damien Le Moal <[email protected]>--- drivers/nvme/target/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/target/auth.c +0
-0
drivers/nvme/target/auth.c void nvmet_auth_sq_free(struct nvmet_sq *sq) · line 246
Quoted 8 lines
drivers/nvme/target/auth.c +1
-1@@ -240,7 +240,7 @@ void nvmet_auth_sq_free(struct nvmet_sq *sq) {cancel_delayed_work (&sq->auth_expired_work);#ifdef CONFIG_NVME_TARGET_TCP_TLS - sq->tls_key =0 ; + sq->tls_key =NULL ;#endif kfree (sq->dhchap_c1); sq->dhchap_c1 =NULL ;
Tsk. Did I do that?
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Quoted 9 lines · Damien Le Moal
When compiling with C=1, the following sparse warning is generated:
auth.c:243:23: warning: Using plain integer as NULL pointer
Avoid this warning by using NULL to instead of 0 to set the sq
tls_keypointer.Fixes fa2e0f8bbc68 ("nvmet-tcp: support secure channel concatenation")Signed-off-by Damien Le Moal<[email protected]>
Looks good.
-ck