[PATCH V2] nvmet: fix compilation errors
Jens Axboe
axboe at kernel.dk
Wed Jan 15 14:33:59 PST 2025
On 1/15/25 3:17 PM, Chaitanya Kulkarni wrote:
> nvmet_alloc_ctrl() only takes nvmet_alloc_ctrl_args. nvmet_alloc_ctrl
> doesn't have nvmet_req argument. In nvmet_alloc_ctrl nvmet_req is
> needed when setting up authentication capabilities since call to
> nvmet_setup_auth() requires nvmet_req argument which later uses req->sq
> to determnine if tls is enabled or not.
>
> That leads to following compilation errors:-
>
> target/fabrics-cmd.c: In function ?nvmet_execute_admin_connect?:
> target/fabrics-cmd.c:318:35: error: too few arguments to function ?nvmet_connect_result?
> | ^~~~~~~~~~~
> target/fabrics-cmd.c:237:12: note: declared here
> 237 | static u32 nvmet_connect_result(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
> | ^~~~~~~~~~~~~~~~~~~~
> make[4]: *** [/mnt/data/nvme/scripts/Makefile.build:194: target/fabrics-cmd.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> target/core.c: In function ?nvmet_alloc_ctrl?:
> target/core.c:1527:37: error: ?struct nvmet_alloc_ctrl_args? has no member named ?req?
> 1527 | struct nvmet_req *req = args->req;
> | ^~
> target/core.c:1635:25: error: too few arguments to function ?nvmet_setup_auth?
> 1635 | dhchap_status = nvmet_setup_auth(ctrl);
> | ^~~~~~~~~~~~~~~~
> In file included from target/trace.h:19,
> from target/core.c:16:
> target/nvmet.h:879:4: note: declared here
> 879 | u8 nvmet_setup_auth(struct nvmet_ctrl *ctrl, struct nvmet_req *req);
> | ^~~~~~~~~~~~~~~~
> target/core.c:1654:17: error: too few arguments to function ?nvmet_has_auth?
> 1654 | nvmet_has_auth(ctrl) ? " with DH-HMAC-CHAP" : "");
> | ^~~~~~~~~~~~~~
> 889 | static inline bool nvmet_has_auth(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
> | ^~~~~~~~~~~~~~
> target/core.c:1527:27: warning: unused variable ?req? [-Wunused-variable]
> 1527 | struct nvmet_req *req = args->req;
> | ^~~
>
> Fix these errors with addition of the nvmet_req *req parameter to
> nvmet_alloc_ctrl(), new prototype :-
I think that "what tree is this" applies to this as a whole. None of
this seems to make sense looking at my for-next tree...
--
Jens Axboe
More information about the Linux-nvme
mailing list