diff options
author | Christoph Hellwig <hch@lst.de> | 2024-06-26 16:26:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-26 09:37:35 -0600 |
commit | fcf865e357f80285af12c0c9a49f89d71acb7f4b (patch) | |
tree | f364887383ff136f0c77cd1bd87905fab0b7c73e /block | |
parent | ec9b1cf0b0ebfb52274971a8a0e74e0a133f64fb (diff) |
block: convert features and flags to __bitwise types
... and let sparse help us catch mismatches or abuses.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240626142637.300624-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-sysfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 3a167abecdce..2e6d9b918127 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -288,7 +288,7 @@ static ssize_t queue_dma_alignment_show(struct request_queue *q, char *page) } static ssize_t queue_feature_store(struct request_queue *q, const char *page, - size_t count, unsigned int feature) + size_t count, blk_features_t feature) { struct queue_limits lim; unsigned long val; @@ -418,7 +418,7 @@ static ssize_t queue_poll_delay_store(struct request_queue *q, const char *page, static ssize_t queue_poll_show(struct request_queue *q, char *page) { - return queue_var_show(q->limits.features & BLK_FEAT_POLL, page); + return queue_var_show(!!(q->limits.features & BLK_FEAT_POLL), page); } static ssize_t queue_poll_store(struct request_queue *q, const char *page, @@ -492,7 +492,7 @@ static ssize_t queue_fua_show(struct request_queue *q, char *page) static ssize_t queue_dax_show(struct request_queue *q, char *page) { - return queue_var_show(blk_queue_dax(q), page); + return queue_var_show(!!blk_queue_dax(q), page); } #define QUEUE_RO_ENTRY(_prefix, _name) \ |