Commit fd07dc81 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

blk-mq: Make blk_flags_show() callers append a newline character

This patch does not change any functionality but makes it possible
to produce a single line of output with multiple flag-to-name
translations.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 65ca1ca3
...@@ -60,7 +60,6 @@ static int blk_flags_show(struct seq_file *m, const unsigned long flags, ...@@ -60,7 +60,6 @@ static int blk_flags_show(struct seq_file *m, const unsigned long flags,
else else
seq_printf(m, "%d", i); seq_printf(m, "%d", i);
} }
seq_puts(m, "\n");
return 0; return 0;
} }
...@@ -102,6 +101,7 @@ static int blk_queue_flags_show(struct seq_file *m, void *v) ...@@ -102,6 +101,7 @@ static int blk_queue_flags_show(struct seq_file *m, void *v)
blk_flags_show(m, q->queue_flags, blk_queue_flag_name, blk_flags_show(m, q->queue_flags, blk_queue_flag_name,
ARRAY_SIZE(blk_queue_flag_name)); ARRAY_SIZE(blk_queue_flag_name));
seq_puts(m, "\n");
return 0; return 0;
} }
...@@ -193,6 +193,7 @@ static int hctx_state_show(struct seq_file *m, void *v) ...@@ -193,6 +193,7 @@ static int hctx_state_show(struct seq_file *m, void *v)
blk_flags_show(m, hctx->state, hctx_state_name, blk_flags_show(m, hctx->state, hctx_state_name,
ARRAY_SIZE(hctx_state_name)); ARRAY_SIZE(hctx_state_name));
seq_puts(m, "\n");
return 0; return 0;
} }
...@@ -236,6 +237,7 @@ static int hctx_flags_show(struct seq_file *m, void *v) ...@@ -236,6 +237,7 @@ static int hctx_flags_show(struct seq_file *m, void *v)
blk_flags_show(m, blk_flags_show(m,
hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy),
hctx_flag_name, ARRAY_SIZE(hctx_flag_name)); hctx_flag_name, ARRAY_SIZE(hctx_flag_name));
seq_puts(m, "\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment