From 347bb119f5a28d042d66ec9bf8ff54a921c07454 Mon Sep 17 00:00:00 2001 From: Akilesh Kailash Date: Wed, 26 May 2021 17:33:36 +0000 Subject: [PATCH] ANDROID: dm-user: Fix build warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix kernelci build warnings for 'allmodconfig' builds. In file included from ../include/linux/printk.h:7, from ../include/linux/kernel.h:16, from ../include/linux/list.h:9, from ../include/linux/wait.h:7, from ../include/linux/wait_bit.h:8, from ../include/linux/fs.h:6, from ../include/linux/highmem.h:5, from ../include/linux/bio.h:8, from ../include/linux/device-mapper.h:11, from ../drivers/md/dm-user.c:7: ../drivers/md/dm-user.c: In function ‘process_delayed_work’: ../include/linux/kern_levels.h:5:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘sector_t’ {aka ‘long long unsigned int’} [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^~~~~~ ../include/linux/kern_levels.h:11:18: note: in expansion of macro ‘KERN_SOH’ #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ ../include/linux/printk.h:348:9: note: in expansion of macro ‘KERN_ERR’ printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~ ../drivers/md/dm-user.c:222:2: note: in expansion of macro ‘pr_err’ pr_err("IO error: sector %d: no user-space daemon for %s target\n", ^~~~~~ ../drivers/md/dm-user.c:222:28: note: format string is defined here pr_err("IO error: sector %d: no user-space daemon for %s target\n", ~^ %lld Bug: 188362117 Test: Build Reported-by: tkjos@google.com Fixes: 9d80dbe0a385 ("ANDROID: dm-user: Fail the IO if there is no daemon") Signed-off-by: Akilesh Kailash Change-Id: Ia9fbac76616a8f8c743e16f0fc8ba0cd3e498b9e --- drivers/md/dm-user.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-user.c b/drivers/md/dm-user.c index 43966ca08e5c..e5a85202d8a0 100644 --- a/drivers/md/dm-user.c +++ b/drivers/md/dm-user.c @@ -219,8 +219,9 @@ static void process_delayed_work(struct work_struct *work) * Terminate the IO with an error */ list_del(&msg->to_user); - pr_err("IO error: sector %d: no user-space daemon for %s target\n", - msg->bio->bi_iter.bi_sector, t->miscdev.name); + pr_err("I/O error: sector %llu: no user-space daemon for %s target\n", + msg->bio->bi_iter.bi_sector, + t->miscdev.name); message_kill(msg, &t->message_pool); mutex_unlock(&t->lock); }