diff mbox series

[v2,10/12] block: Simplify definition of RQF_NAME()

Message ID 20240711082339.1155658-11-john.g.garry@oracle.com (mailing list archive)
State New, archived
Headers show
Series block: Catch missing debugfs flag array members | expand

Commit Message

John Garry July 11, 2024, 8:23 a.m. UTC
Now that we have a bit index for RQF_x in __RQF_x, use __RQF_x to simplify
the definition of RQF_NAME() by not using ilog2((__force u32()).

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 block/blk-mq-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bart Van Assche July 11, 2024, 6:14 p.m. UTC | #1
On 7/11/24 1:23 AM, John Garry wrote:
> Now that we have a bit index for RQF_x in __RQF_x, use __RQF_x to simplify
> the definition of RQF_NAME() by not using ilog2((__force u32()).

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 971457b0a441..305c53459fb5 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -240,7 +240,7 @@  static const char *const cmd_flag_name[] = {
 };
 #undef CMD_FLAG_NAME
 
-#define RQF_NAME(name) [ilog2((__force u32)RQF_##name)] = #name
+#define RQF_NAME(name) [__RQF_##name] = #name
 static const char *const rqf_name[] = {
 	RQF_NAME(STARTED),
 	RQF_NAME(FLUSH_SEQ),