diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-02-27 18:25:22 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-03-10 21:49:06 -0800 |
commit | 0241fd39ce7bc9b82b7e57305cb0d6bb1364d45b (patch) | |
tree | 318545b7df8d7c9a4ba74e84287102a9f0c318e1 /drivers/target | |
parent | b25c786399367b9a8bd955d8496669d019409bec (diff) | |
download | linux-0241fd39ce7bc9b82b7e57305cb0d6bb1364d45b.tar.gz linux-0241fd39ce7bc9b82b7e57305cb0d6bb1364d45b.tar.bz2 linux-0241fd39ce7bc9b82b7e57305cb0d6bb1364d45b.zip |
target/user: Fix size_t format-spec build warning
Fix the following printk size_t warning as per 0-day build:
All warnings (new ones prefixed by >>):
drivers/target/target_core_user.c: In function 'is_ring_space_avail':
>> drivers/target/target_core_user.c:385:12: warning: format '%lu'
>> expects argument of type 'long unsigned int', but argument 3 has type
>> 'size_t {aka unsigned int}' [-Wformat=]
pr_debug("no data space: only %lu available, but ask for %lu\n",
^
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_user.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index d0655913896b..fc4789c6067c 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -356,9 +356,8 @@ static inline size_t spc_bitmap_free(unsigned long *bitmap) static bool is_ring_space_avail(struct tcmu_dev *udev, size_t cmd_size, size_t data_needed) { struct tcmu_mailbox *mb = udev->mb_addr; - size_t space; + size_t space, cmd_needed; u32 cmd_head; - size_t cmd_needed; tcmu_flush_dcache_range(mb, sizeof(*mb)); @@ -382,7 +381,7 @@ static bool is_ring_space_avail(struct tcmu_dev *udev, size_t cmd_size, size_t d space = spc_bitmap_free(udev->data_bitmap); if (space < data_needed) { - pr_debug("no data space: only %lu available, but ask for %lu\n", + pr_debug("no data space: only %zu available, but ask for %zu\n", space, data_needed); return false; } |