summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2020-02-05 20:57:10 -0800
committerJens Axboe <axboe@kernel.dk>2020-02-06 13:41:00 -0700
commite1d85334d62386e9503e4a0d5d022e2d8e0011a0 (patch)
tree05b032d0fdabdea41f6f93889d6668908bf4e946 /fs/io_uring.c
parent1cb1edb2f5ba8a3e8d47ded391007c6fe3ac0ad7 (diff)
downloadlinux-e1d85334d62386e9503e4a0d5d022e2d8e0011a0.tar.bz2
io_uring: fix 1-bit bitfields to be unsigned
Make bitfields of size 1 bit be unsigned (since there is no room for the sign bit). This clears up the sparse warnings: CHECK ../fs/io_uring.c ../fs/io_uring.c:207:50: error: dubious one-bit signed bitfield ../fs/io_uring.c:208:55: error: dubious one-bit signed bitfield ../fs/io_uring.c:209:63: error: dubious one-bit signed bitfield ../fs/io_uring.c:210:54: error: dubious one-bit signed bitfield ../fs/io_uring.c:211:57: error: dubious one-bit signed bitfield Found by sight and then verified with sparse. Fixes: 69b3e546139a ("io_uring: change io_ring_ctx bool fields into bit fields") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: io-uring@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 1859e866c728..a31187e90697 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -204,11 +204,11 @@ struct io_ring_ctx {
struct {
unsigned int flags;
- int compat: 1;
- int account_mem: 1;
- int cq_overflow_flushed: 1;
- int drain_next: 1;
- int eventfd_async: 1;
+ unsigned int compat: 1;
+ unsigned int account_mem: 1;
+ unsigned int cq_overflow_flushed: 1;
+ unsigned int drain_next: 1;
+ unsigned int eventfd_async: 1;
/*
* Ring buffer of indices into array of io_uring_sqe, which is