aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2017-11-24 18:14:25 -0500
committerJens Axboe <axboe@kernel.dk>2017-11-24 18:22:58 -0500
commitcf33c1ee5254c6a430bc1538232b49c3ea13e613 (patch)
tree0318204e26ecf0913cbd7587e198828451d58a31 /drivers
parentbb22cafd75686d799dabfe422571fac4b5c2ed94 (diff)
bcache: Fix building error on MIPS
This patch try to fix the building error on MIPS. The reason is MIPS has already defined the PTR macro, which conflicts with the PTR macro in include/uapi/linux/bcache.h. [fixed by mlyle: corrected a line-length issue] Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen <chenhc@lemote.com> Reviewed-by: Michael Lyle <mlyle@lyle.org> Signed-off-by: Michael Lyle <mlyle@lyle.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/bcache/alloc.c2
-rw-r--r--drivers/md/bcache/extents.c2
-rw-r--r--drivers/md/bcache/journal.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index a27d85232ce1..a0cc1bc6d884 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -490,7 +490,7 @@ int __bch_bucket_alloc_set(struct cache_set *c, unsigned reserve,
490 if (b == -1) 490 if (b == -1)
491 goto err; 491 goto err;
492 492
493 k->ptr[i] = PTR(ca->buckets[b].gen, 493 k->ptr[i] = MAKE_PTR(ca->buckets[b].gen,
494 bucket_to_sector(c, b), 494 bucket_to_sector(c, b),
495 ca->sb.nr_this_dev); 495 ca->sb.nr_this_dev);
496 496
diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
index 41c238fc3733..f9d391711595 100644
--- a/drivers/md/bcache/extents.c
+++ b/drivers/md/bcache/extents.c
@@ -585,7 +585,7 @@ static bool bch_extent_merge(struct btree_keys *bk, struct bkey *l, struct bkey
585 return false; 585 return false;
586 586
587 for (i = 0; i < KEY_PTRS(l); i++) 587 for (i = 0; i < KEY_PTRS(l); i++)
588 if (l->ptr[i] + PTR(0, KEY_SIZE(l), 0) != r->ptr[i] || 588 if (l->ptr[i] + MAKE_PTR(0, KEY_SIZE(l), 0) != r->ptr[i] ||
589 PTR_BUCKET_NR(b->c, l, i) != PTR_BUCKET_NR(b->c, r, i)) 589 PTR_BUCKET_NR(b->c, l, i) != PTR_BUCKET_NR(b->c, r, i))
590 return false; 590 return false;
591 591
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 5018c56ebb67..a87165c1d8e5 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -512,7 +512,7 @@ static void journal_reclaim(struct cache_set *c)
512 continue; 512 continue;
513 513
514 ja->cur_idx = next; 514 ja->cur_idx = next;
515 k->ptr[n++] = PTR(0, 515 k->ptr[n++] = MAKE_PTR(0,
516 bucket_to_sector(c, ca->sb.d[ja->cur_idx]), 516 bucket_to_sector(c, ca->sb.d[ja->cur_idx]),
517 ca->sb.nr_this_dev); 517 ca->sb.nr_this_dev);
518 } 518 }