Re: [ceph-client:testing 3/4] include/linux/ceph/ceph_debug.h:5:21: note: in expansion of macro 'KBUILD_MODNAME'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luis Henriques <lhenriques@xxxxxxxx> writes:

> kbuild test robot <lkp@xxxxxxxxx> writes:
>
>> tree:   https://github.com/ceph/ceph-client.git testing
>> head:   6fb0eaf13dcddf369aee4f72d00bd041111cc606
>> commit: cd574cfa473f997b8124a97a0eac2c24671a414c [3/4] ceph: support copy_file_range file operation
>> config: sh-allmodconfig (attached as .config)
>> compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
>> reproduce:
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         git checkout cd574cfa473f997b8124a97a0eac2c24671a414c
>>         # save the attached .config to linux build tree
>>         GCC_VERSION=7.2.0 make.cross ARCH=sh 
>>
>> All warnings (new ones prefixed by >>):
>>
>>    fs//ceph/file.c: In function 'is_file_size_ok':
>>>> <command-line>:0:16: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'size_t {aka unsigned int}' [-Wformat=]
>
> Ugh!  I believe the patch below should fix this build warning (although
> I didn't actually tried to reproduce it).
>
> Anyway, sorry for the noise and feel free to fold this patch into the
> copy_file_range series.
>

Actually.. I just found another similar warning.  Please use the patch
bellow instead.

Cheers,
-- 
Luis

>From b58aa11ec3babeddd2ae4626df68716f73af96fd Mon Sep 17 00:00:00 2001
From: Luis Henriques <lhenriques@xxxxxxxx>
Date: Thu, 18 Oct 2018 11:06:50 +0100
Subject: [PATCH] ceph: fix warnings in dout format strings

This patch fixes build warnings in dout().  '%ld' was being used
instead of '%zu' and '%zd' to print size_t and ssize_t types.

Signed-off-by: Luis Henriques <lhenriques@xxxxxxxx>
---
 fs/ceph/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 5e5f73ad7a6d..f788496fafcc 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1870,7 +1870,7 @@ static int is_file_size_ok(struct inode *src_inode, struct inode *dst_inode,
 	 * inode.
 	 */
 	if (src_off + len > size) {
-		dout("Copy beyond EOF (%llu + %ld > %llu)\n",
+		dout("Copy beyond EOF (%llu + %zu > %llu)\n",
 		     src_off, len, size);
 		return -EOPNOTSUPP;
 	}
@@ -1962,7 +1962,7 @@ static ssize_t ceph_copy_file_range(struct file *src_file, loff_t src_off,
 					    dst_off >> PAGE_SHIFT,
 					    endoff >> PAGE_SHIFT);
 	if (ret < 0) {
-		dout("Failed to invalidate inode pages (%ld)\n", ret);
+		dout("Failed to invalidate inode pages (%zd)\n", ret);
 		ret = 0; /* XXX */
 	}
 	src_oloc.pool = src_ci->i_layout.pool_id;



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux