Skip to content

Commit

Permalink
blk-mq: fix sparse warning on missed __percpu annotation
Browse files Browse the repository at this point in the history
'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 <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ming1 authored and axboe committed Jun 4, 2014
1 parent cb96a42 commit e6cdb09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,7 @@ static void blk_mq_add_queue_tag_set(struct blk_mq_tag_set *set,
struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
{
struct blk_mq_hw_ctx **hctxs;
struct blk_mq_ctx *ctx;
struct blk_mq_ctx __percpu *ctx;
struct request_queue *q;
unsigned int *map;
int i;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ struct request_queue {
unsigned int *mq_map;

/* sw queues */
struct blk_mq_ctx *queue_ctx;
struct blk_mq_ctx __percpu *queue_ctx;
unsigned int nr_queues;

/* hw dispatch queues */
Expand Down

0 comments on commit e6cdb09

Please sign in to comment.