public inbox for [email protected]
 help / color / mirror / Atom feed
From: Christoph Hellwig <[email protected]>
To: Vasily Averin <[email protected]>
Cc: Jens Axboe <[email protected]>,
	Christoph Hellwig <[email protected]>,
	[email protected], [email protected],
	Pavel Begunkov <[email protected]>,
	Steven Rostedt <[email protected]>,
	Ingo Molnar <[email protected]>,
	[email protected]
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: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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.

  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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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