Re: [PATCH 09/11] block: Make RQF_x as an enum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?







[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux