Commit e4955c99 authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

blktrace: mark ddir_act[] const

Impact: cleanup

ddir_act and what2act always stay immutable.
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarJens Axboe <jens.axboe@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <49C89415.5080503@cn.fujitsu.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b125130b
...@@ -147,8 +147,8 @@ static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, ...@@ -147,8 +147,8 @@ static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector,
/* /*
* Data direction bit lookup * Data direction bit lookup
*/ */
static u32 ddir_act[2] __read_mostly = { BLK_TC_ACT(BLK_TC_READ), static const u32 ddir_act[2] = { BLK_TC_ACT(BLK_TC_READ),
BLK_TC_ACT(BLK_TC_WRITE) }; BLK_TC_ACT(BLK_TC_WRITE) };
/* The ilog2() calls fall out because they're constant */ /* The ilog2() calls fall out because they're constant */
#define MASK_TC_BIT(rw, __name) ((rw & (1 << BIO_RW_ ## __name)) << \ #define MASK_TC_BIT(rw, __name) ((rw & (1 << BIO_RW_ ## __name)) << \
...@@ -1116,10 +1116,10 @@ static void blk_tracer_reset(struct trace_array *tr) ...@@ -1116,10 +1116,10 @@ static void blk_tracer_reset(struct trace_array *tr)
blk_tracer_stop(tr); blk_tracer_stop(tr);
} }
static struct { static const struct {
const char *act[2]; const char *act[2];
int (*print)(struct trace_seq *s, const struct trace_entry *ent); int (*print)(struct trace_seq *s, const struct trace_entry *ent);
} what2act[] __read_mostly = { } what2act[] = {
[__BLK_TA_QUEUE] = {{ "Q", "queue" }, blk_log_generic }, [__BLK_TA_QUEUE] = {{ "Q", "queue" }, blk_log_generic },
[__BLK_TA_BACKMERGE] = {{ "M", "backmerge" }, blk_log_generic }, [__BLK_TA_BACKMERGE] = {{ "M", "backmerge" }, blk_log_generic },
[__BLK_TA_FRONTMERGE] = {{ "F", "frontmerge" }, blk_log_generic }, [__BLK_TA_FRONTMERGE] = {{ "F", "frontmerge" }, blk_log_generic },
......
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