From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH 09/11] block: Make RQF_x as an enum
Date: Tue, 9 Jul 2024 12:51:12 +0100 [thread overview]
Message-ID: <b1539d6b-63ab-4bc9-97f9-e45cc8803630@oracle.com> (raw)
In-Reply-To: <20240709112318.GA5358@lst.de>
On 09/07/2024 12:23, Christoph Hellwig wrote:
>> +enum {
>> + /* drive already may have started this one */
>> + RQF_STARTED = ((__force req_flags_t)(1 << 0)),
>
> Last time I tried to mix __bitwise and enums sparse was very unhappy.
> Did this get fixed?
For me, sparse only complains about RQF_MAX, which is added later.
But, as I noted, I think that needs to change to a bit count from a flag
anyway. I am not sure how that would look, maybe:
enum {
RQF_STARTED_BIT = 0,
...
RQF_MAX_BITS
};
and then use a macro to define RQF_STARTED as ((__force
req_flags_t)(RQF_STARTED_BIT << 0))
But do you remember how you generated the sparse warning specifically?
>
next prev parent reply other threads:[~2024-07-09 11:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 11:05 [PATCH RFC 00/11] block debugfs: Catch missing flag array members John Garry
2024-07-09 11:05 ` [PATCH 01/11] block: remove QUEUE_FLAG_STOPPED John Garry
2024-07-09 11:05 ` [PATCH 02/11] block: Make QUEUE_FLAG_x as an enum John Garry
2024-07-09 11:05 ` [PATCH 03/11] block: Add build-time assert for size of blk_queue_flag_name[] John Garry
2024-07-09 11:05 ` [PATCH 04/11] block: Catch possible entries missing from hctx_state_name[] John Garry
2024-07-09 11:05 ` [PATCH 05/11] block: Catch possible entries missing from hctx_flag_name[] John Garry
2024-07-09 11:05 ` [PATCH 06/11] block: Catch possible entries missing from alloc_policy_name[] John Garry
2024-07-09 11:05 ` [PATCH 07/11] block: Add missing entries from cmd_flag_name[] John Garry
2024-07-09 23:08 ` kernel test robot
2024-07-09 11:05 ` [PATCH 08/11] block: Catch possible entries missing " John Garry
2024-07-09 11:05 ` [PATCH 09/11] block: Make RQF_x as an enum John Garry
2024-07-09 11:23 ` Christoph Hellwig
2024-07-09 11:51 ` John Garry [this message]
2024-07-09 11:05 ` [PATCH 10/11] block: Add zone write plugging entry to rqf_name[] John Garry
2024-07-09 11:05 ` [PATCH 11/11] block: Catch possible entries missing from rqf_name[] John Garry
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=b1539d6b-63ab-4bc9-97f9-e45cc8803630@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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