From: Christoph Hellwig <hch@infradead.org>
To: Vasily Averin <vvs@openvz.org>
Cc: Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@infradead.org>,
kernel@openvz.org, linux-kernel@vger.kernel.org,
Pavel Begunkov <asml.silence@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
io-uring@vger.kernel.org
Subject: Re: [PATCH v2] io_uring: fix sparce warnings about __kernel_rwf_t casts
Date: Thu, 19 May 2022 00:03:07 -0700 [thread overview]
Message-ID: <YoXrq23tjl1v3YD0@infradead.org> (raw)
In-Reply-To: <7de7721b-d090-6400-9a74-30ecb696761b@openvz.org>
On Wed, May 18, 2022 at 12:20:46PM +0300, Vasily Averin wrote:
> __kernel_rwf_t type is bitwise and requires __force attribute for casts.
>
> To fix the warnings, the patch changes the type of fields in the
> corresponding structures: poll32_events and rw_flags are neighbours
> in the same union.
Jens actually picked up a series from me that picked up most of this,
except for this hunk:
> index cddf5b6fbeb4..34839f30caee 100644
> --- a/include/trace/events/io_uring.h
> +++ b/include/trace/events/io_uring.h
> @@ -520,7 +520,7 @@ TRACE_EVENT(io_uring_req_failed,
> __entry->off = sqe->off;
> __entry->addr = sqe->addr;
> __entry->len = sqe->len;
> - __entry->op_flags = sqe->rw_flags;
> + __entry->op_flags = sqe->poll32_events;
> __entry->buf_index = sqe->buf_index;
> __entry->personality = sqe->personality;
> __entry->file_index = sqe->file_index;
For which I did not see a warning even if it looks real to me.
But this union with basically a lot of __u32s here looks pretty
strange to start with to me.
next prev parent reply other threads:[~2022-05-19 7:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 16:23 [PATCH] sparse: use force attribute for __kernel_rwf_t casts Vasily Averin
2022-05-14 20:53 ` Jens Axboe
2022-05-16 6:28 ` Christoph Hellwig
2022-05-18 9:20 ` [PATCH v2] io_uring: fix sparce warnings about " Vasily Averin
2022-05-19 7:03 ` Christoph Hellwig [this message]
2022-05-19 12:13 ` Jens Axboe
2022-05-19 14:30 ` [PATCH v3] io_uring: fix incorrect __kernel_rwf_t cast Vasily Averin
2022-05-19 18:28 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YoXrq23tjl1v3YD0@infradead.org \
--to=hch@infradead.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=kernel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vvs@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox