]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/net: fix build warning for !CONFIG_COMPAT
authorArnd Bergmann <arnd@arndb.de>
Thu, 27 Feb 2025 13:20:09 +0000 (14:20 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Feb 2025 14:53:31 +0000 (07:53 -0700)
commit4afc332bc86c34b74f1211650f748feb6942a9cc
treeba89b054ee3dc9b956ad2c610d0ea6eae0f8652c
parent0fea2c4509a7aacb32445d12516abf01c012c806
io_uring/net: fix build warning for !CONFIG_COMPAT

A code rework resulted in an uninitialized return code when COMPAT
mode is disabled:

io_uring/net.c:722:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
  722 |         if (io_is_compat(req->ctx)) {
      |             ^~~~~~~~~~~~~~~~~~~~~~
io_uring/net.c:736:15: note: uninitialized use occurs here
  736 |         if (unlikely(ret))
      |                      ^~~

Since io_is_compat() turns into a compile-time 'false', the #ifdef
here is completely unnecessary, and removing it avoids the warning.

Fixes: 51e158d40589 ("io_uring/net: unify *mshot_prep calls with compat")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250227132018.1111094-1-arnd@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c