lkml.org 
[lkml]   [2017]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] block, dax: use correct format string in bdev_dax_supported
Date
The new message has an incorrect format string, causing a warning in some
configurations:

fs/block_dev.c: In function 'bdev_dax_supported':
fs/block_dev.c:779:5: error: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Werror=format=]
"error: dax access failed (%d)", len);

This changes it to use the correct %ld instead of %d.

Fixes: d9fe35682a16 ("block, dax: convert bdev_dax_supported() to dax_direct_access()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/block_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index f625dcebcf13..2a305c1a2d88 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -775,7 +775,7 @@ int bdev_dax_supported(struct super_block *sb, int blocksize)

if (len < 1) {
vfs_msg(sb, KERN_ERR,
- "error: dax access failed (%d)", len);
+ "error: dax access failed (%ld)", len);
return len < 0 ? len : -EIO;
}

--
2.9.0
\
 
 \ /
  Last update: 2017-04-27 16:31    [W:0.031 / U:3.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site