aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorBart Van Assche2017-04-26 15:47:54 -0500
committerJens Axboe2017-04-26 16:09:04 -0500
commitfd07dc81850e8bf26046bf7ccd7430211c9c5910 (patch)
tree2dbb39aa7dd17b3ab9be4a743969ead78d8d4571 /block
parent65ca1ca32ca359e9d75a6fd293128d188dfc0d8a (diff)
downloadkernel-fd07dc81850e8bf26046bf7ccd7430211c9c5910.tar.gz
kernel-fd07dc81850e8bf26046bf7ccd7430211c9c5910.tar.xz
kernel-fd07dc81850e8bf26046bf7ccd7430211c9c5910.zip
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: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq-debugfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 1132be4e9c1c..ccc7b0f71230 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -60,7 +60,6 @@ static int blk_flags_show(struct seq_file *m, const unsigned long flags,
60 else 60 else
61 seq_printf(m, "%d", i); 61 seq_printf(m, "%d", i);
62 } 62 }
63 seq_puts(m, "\n");
64 return 0; 63 return 0;
65} 64}
66 65
@@ -102,6 +101,7 @@ static int blk_queue_flags_show(struct seq_file *m, void *v)
102 101
103 blk_flags_show(m, q->queue_flags, blk_queue_flag_name, 102 blk_flags_show(m, q->queue_flags, blk_queue_flag_name,
104 ARRAY_SIZE(blk_queue_flag_name)); 103 ARRAY_SIZE(blk_queue_flag_name));
104 seq_puts(m, "\n");
105 return 0; 105 return 0;
106} 106}
107 107
@@ -193,6 +193,7 @@ static int hctx_state_show(struct seq_file *m, void *v)
193 193
194 blk_flags_show(m, hctx->state, hctx_state_name, 194 blk_flags_show(m, hctx->state, hctx_state_name,
195 ARRAY_SIZE(hctx_state_name)); 195 ARRAY_SIZE(hctx_state_name));
196 seq_puts(m, "\n");
196 return 0; 197 return 0;
197} 198}
198 199
@@ -236,6 +237,7 @@ static int hctx_flags_show(struct seq_file *m, void *v)
236 blk_flags_show(m, 237 blk_flags_show(m,
237 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy), 238 hctx->flags ^ BLK_ALLOC_POLICY_TO_MQ_FLAG(alloc_policy),
238 hctx_flag_name, ARRAY_SIZE(hctx_flag_name)); 239 hctx_flag_name, ARRAY_SIZE(hctx_flag_name));
240 seq_puts(m, "\n");
239 return 0; 241 return 0;
240} 242}
241 243