io_uring/cmd: axe duplicate io_uring_cmd_import_fixed_vec() declaration
PATCH 1/1 io_uring/cmd: axe duplicate io_uring_cmd_import_fixed_vec() declaration
io_uring_cmd_import_fixed_vec() is declared in both include/linux/io_uring/cmd.h and io_uring/uring_cmd.h. The declarations are identical (if redundant) for CONFIG_IO_URING=y. But if CONFIG_IO_URING=N, include/linux/io_uring/cmd.h declares the function as static inline while io_uring/uring_cmd.h declares it as extern. This causes linker errors if the declaration in io_uring/uring_cmd.h is used.
Remove the declaration in io_uring/uring_cmd.h to avoid linker errors and prevent the declarations getting out of sync.
--- io_uring/uring_cmd.h | 6 ------ 1 file changed, 6 deletions(-)
io_uring/uring_cmd.h +0 -6
@@ -15,11 +15,5 @@ void io_uring_cmd_cleanup(struct io_kiocb *req);bool io_uring_try_cancel_uring_cmd (struct io_ring_ctx *ctx,struct io_uring_task *tctx,bool cancel_all);void io_cmd_cache_free (const void *entry); - -int io_uring_cmd_import_fixed_vec (struct io_uring_cmd *ioucmd, -const struct iovec __user *uvec, -size_t uvec_segs, -int ddir,struct iov_iter *iter, -unsigned issue_flags);
Signature · 1 line
2.45.2
Quoted 8 lines · Caleb Sander Mateos
io_uring_cmd_import_fixed_vec()is declared in bothinclude/linux/io_uring/cmd.handio_uring/uring_cmd.h. The declarations are identical (if redundant) forCONFIG_IO_URING=y. But ifCONFIG_IO_URING=N,include/linux/io_uring/cmd.hdeclares the function as static inline whileio_uring/uring_cmd.hdeclares it as extern. This causes linker errors if the declaration inio_uring/uring_cmd.his used.[...]
Applied, thanks!
[1/1] io_uring/cmd: axe duplicate io_uring_cmd_import_fixed_vec() declaration
commit: f1774d9d4e104639a9122bde3b1fe58a0c0dcde7
Best regards,
Signature · 1 line
Jens Axboe