From 50b46f6f4eeec61345ab6d8cafe6cb1589e30f86 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 11 Sep 2013 14:40:17 -0600 Subject: [PATCH] skd: get rid of readq() and a pr_err() build warning Kill SKD_READQ() and skd_reg_read64, it's not used. The writeq() remains, needs to be fixed for 32-bit. Fix cast of pr_err(). Signed-off-by: Jens Axboe --- drivers/block/skd_main.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index a6d0c7ae0c90..6fc0296aff36 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -397,7 +397,6 @@ struct skd_flush_cmd { #define SKD_WRITEL(DEV, VAL, OFF) skd_reg_write32(DEV, VAL, OFF) #define SKD_READL(DEV, OFF) skd_reg_read32(DEV, OFF) #define SKD_WRITEQ(DEV, VAL, OFF) skd_reg_write64(DEV, VAL, OFF) -#define SKD_READQ(DEV, OFF) skd_reg_read64(DEV, OFF) static inline u32 skd_reg_read32(struct skd_device *skdev, u32 offset) { @@ -433,21 +432,6 @@ static inline void skd_reg_write32(struct skd_device *skdev, u32 val, } } -static inline u64 skd_reg_read64(struct skd_device *skdev, u32 offset) -{ - u64 val; - - if (likely(skdev->dbg_level < 2)) - return readq(skdev->mem_map[1] + offset); - else { - barrier(); - val = readq(skdev->mem_map[1] + offset); - barrier(); - VPRINTK(skdev, "offset %x = %016llx\n", offset, val); - return val; - } -} - static inline void skd_reg_write64(struct skd_device *skdev, u64 val, u32 offset) { @@ -4581,7 +4565,8 @@ static int skd_cons_skmsg(struct skd_device *skdev) VPRINTK(skdev, "skmsg_table kzalloc, struct %lu, count %u total %lu\n", sizeof(struct skd_fitmsg_context), skdev->num_fitmsg_context, - sizeof(struct skd_fitmsg_context) * skdev->num_fitmsg_context); + (unsigned long) sizeof(struct skd_fitmsg_context) * + skdev->num_fitmsg_context); skdev->skmsg_table = kzalloc(sizeof(struct skd_fitmsg_context) *skdev->num_fitmsg_context, GFP_KERNEL); -- 2.39.5