fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Tom Rix <trix@redhat.com>
The clang build fails with this error
io_uring.c:9396:9: error: variable 'ret' is uninitialized when used here
return ret;
^~~~
Return 0 directly.
Fixes: b77e315a9644 ("io_uring: avoid ring quiesce while registering/unregistering eventfd")
Signed-off-by: Tom Rix <trix@redhat.com>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index aadabb31d6da7..74afb96af214c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9393,7 +9393,7 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
ev_fd->eventfd_async = eventfd_async;
rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
- return ret;
+ return 0;
}
static void io_eventfd_put(struct rcu_head *rcu)
--
2.26.3
On Mon, Feb 7, 2022 at 10:51 AM <trix@redhat.com> wrote:
>
> From: Tom Rix <trix@redhat.com>
>
> The clang build fails with this error
> io_uring.c:9396:9: error: variable 'ret' is uninitialized when used here
> return ret;
> ^~~~
> Return 0 directly.
>
> Fixes: b77e315a9644 ("io_uring: avoid ring quiesce while registering/unregistering eventfd")
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks for the patch:
See also:
https://lore.kernel.org/llvm/20220207162410.1013466-1-nathan@kernel.org/
> ---
> fs/io_uring.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index aadabb31d6da7..74afb96af214c 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -9393,7 +9393,7 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
> ev_fd->eventfd_async = eventfd_async;
>
> rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
> - return ret;
> + return 0;
> }
>
> static void io_eventfd_put(struct rcu_head *rcu)
> --
> 2.26.3
>
--
Thanks,
~Nick Desaulniers
On 2/7/22 11:48 AM, Nick Desaulniers wrote:
> On Mon, Feb 7, 2022 at 10:51 AM <trix@redhat.com> wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> The clang build fails with this error
>> io_uring.c:9396:9: error: variable 'ret' is uninitialized when used here
>> return ret;
>> ^~~~
>> Return 0 directly.
>>
>> Fixes: b77e315a9644 ("io_uring: avoid ring quiesce while registering/unregistering eventfd")
>> Signed-off-by: Tom Rix <trix@redhat.com>
> Thanks for the patch:
> See also:
> https://lore.kernel.org/llvm/20220207162410.1013466-1-nathan@kernel.org/
No worries as long as it gets fixed.
Tom
>
>> ---
>> fs/io_uring.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/io_uring.c b/fs/io_uring.c
>> index aadabb31d6da7..74afb96af214c 100644
>> --- a/fs/io_uring.c
>> +++ b/fs/io_uring.c
>> @@ -9393,7 +9393,7 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
>> ev_fd->eventfd_async = eventfd_async;
>>
>> rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
>> - return ret;
>> + return 0;
>> }
>>
>> static void io_eventfd_put(struct rcu_head *rcu)
>> --
>> 2.26.3
>>
>
© 2016 - 2026 Red Hat, Inc.