diff options
author | Ming Lei <tom.leiming@gmail.com> | 2014-06-02 23:24:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-06-03 23:04:39 -0400 |
commit | e6cdb0929fe6726ba5203fc5529b74564d98a9e9 (patch) | |
tree | 349d10c04501a0543c274bcd863d492e35585137 | |
parent | cb96a42cc1f50ba1c7b1e9b2343bec80b926107f (diff) |
blk-mq: fix sparse warning on missed __percpu annotation
'struct blk_mq_ctx' is __percpu, so add the annotation
and fix the sparse warning reported from Fengguang:
[block:for-linus 2/3] block/blk-mq.h:75:16: sparse: incorrect
type in initializer (different address spaces)
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | block/blk-mq.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 43eb3156e110..3bb4cfec276b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -1767,7 +1767,7 @@ static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set, | |||
1767 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) | 1767 | struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set) |
1768 | { | 1768 | { |
1769 | struct blk_mq_hw_ctx **hctxs; | 1769 | struct blk_mq_hw_ctx **hctxs; |
1770 | struct blk_mq_ctx *ctx; | 1770 | struct blk_mq_ctx __percpu *ctx; |
1771 | struct request_queue *q; | 1771 | struct request_queue *q; |
1772 | unsigned int *map; | 1772 | unsigned int *map; |
1773 | int i; | 1773 | int i; |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8aba35f46f87..5c6f836afa1b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -335,7 +335,7 @@ struct request_queue { | |||
335 | unsigned int *mq_map; | 335 | unsigned int *mq_map; |
336 | 336 | ||
337 | /* sw queues */ | 337 | /* sw queues */ |
338 | struct blk_mq_ctx *queue_ctx; | 338 | struct blk_mq_ctx __percpu *queue_ctx; |
339 | unsigned int nr_queues; | 339 | unsigned int nr_queues; |
340 | 340 | ||
341 | /* hw dispatch queues */ | 341 | /* hw dispatch queues */ |