]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
skd: get rid of readq() and a pr_err() build warning
authorJens Axboe <axboe@kernel.dk>
Wed, 11 Sep 2013 20:40:17 +0000 (14:40 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Sep 2013 20:40:17 +0000 (14:40 -0600)
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 <axboe@kernel.dk>
drivers/block/skd_main.c

index a6d0c7ae0c900b7785e4a689c1e779eafd3779d2..6fc0296aff36cae05f6150afe517a09f3055b4a3 100644 (file)
@@ -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);