summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-05-13 20:35:37 -0500
committerSage Weil <sage@inktank.com>2013-07-01 09:52:01 -0700
commit491205a8b45e3d9b594e1e7a997284f2e82f22e9 (patch)
treea8f071d554ad6024485af5e791012b9a0ea3fea6 /drivers/block/rbd.c
parent8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff)
downloadblackbird-obmc-linux-491205a8b45e3d9b594e1e7a997284f2e82f22e9.tar.gz
blackbird-obmc-linux-491205a8b45e3d9b594e1e7a997284f2e82f22e9.zip
rbd: Use min_t() to fix comparison of distinct pointer types warning
drivers/block/rbd.c: In function ‘zero_pages’: drivers/block/rbd.c:1102: warning: comparison of distinct pointer types lacks a cast Remove the hackish casts and use min_t() to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index aff789d6fccd..b4f00e22743d 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1153,8 +1153,8 @@ static void zero_pages(struct page **pages, u64 offset, u64 end)
unsigned long flags;
void *kaddr;
- page_offset = (size_t)(offset & ~PAGE_MASK);
- length = min(PAGE_SIZE - page_offset, (size_t)(end - offset));
+ page_offset = offset & ~PAGE_MASK;
+ length = min_t(size_t, PAGE_SIZE - page_offset, end - offset);
local_irq_save(flags);
kaddr = kmap_atomic(*page);
memset(kaddr + page_offset, 0, length);
OpenPOWER on IntegriCloud