[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210061216.EJD2EZ8c-lkp@intel.com>
Date: Thu, 6 Oct 2022 12:28:19 +0800
From: kernel test robot <lkp@...el.com>
To: Jeff Layton <jlayton@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [jlayton:iversion 17/17] fs/ext4/file.c:290:72: warning: format
specifies type 'long' but the argument has type 'ssize_t' (aka 'int')
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git iversion
head: dd6d62518f85963515225826455d92be6671f7d6
commit: dd6d62518f85963515225826455d92be6671f7d6 [17/17] ext4: update times after I/O in write codepaths
config: i386-randconfig-a002-20221003
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/?id=dd6d62518f85963515225826455d92be6671f7d6
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton iversion
git checkout dd6d62518f85963515225826455d92be6671f7d6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/ext4/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> fs/ext4/file.c:290:72: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
pr_warn_once("ext4: failed to update i_version after write: %ld\n", ret2);
~~~ ^~~~
%zd
include/linux/printk.h:622:42: note: expanded from macro 'pr_warn_once'
printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:603:30: note: expanded from macro 'printk_once'
DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/once_lite.h:11:32: note: expanded from macro 'DO_ONCE_LITE'
DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/once_lite.h:31:9: note: expanded from macro 'DO_ONCE_LITE_IF'
func(__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:464:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:436:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
fs/ext4/file.c:597:72: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
pr_warn_once("ext4: failed to update i_version after write: %ld\n", ret2);
~~~ ^~~~
%zd
include/linux/printk.h:622:42: note: expanded from macro 'pr_warn_once'
printk_once(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:603:30: note: expanded from macro 'printk_once'
DO_ONCE_LITE(printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/once_lite.h:11:32: note: expanded from macro 'DO_ONCE_LITE'
DO_ONCE_LITE_IF(true, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/once_lite.h:31:9: note: expanded from macro 'DO_ONCE_LITE_IF'
func(__VA_ARGS__); \
^~~~~~~~~~~
include/linux/printk.h:464:60: note: expanded from macro 'printk'
#define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/printk.h:436:19: note: expanded from macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
~~~~ ^~~~~~~~~~~
2 warnings generated.
vim +290 fs/ext4/file.c
269
270 static ssize_t ext4_buffered_write_iter(struct kiocb *iocb,
271 struct iov_iter *from)
272 {
273 ssize_t ret;
274 struct inode *inode = file_inode(iocb->ki_filp);
275
276 if (iocb->ki_flags & IOCB_NOWAIT)
277 return -EOPNOTSUPP;
278
279 inode_lock(inode);
280 ret = ext4_write_checks(iocb, from);
281 if (ret <= 0)
282 goto out;
283
284 current->backing_dev_info = inode_to_bdi(inode);
285 ret = generic_perform_write(iocb, from);
286 current->backing_dev_info = NULL;
287 if (ret > 0) {
288 ssize_t ret2 = file_update_iversion(iocb->ki_filp);
289 if (ret2)
> 290 pr_warn_once("ext4: failed to update i_version after write: %ld\n", ret2);
291 }
292 out:
293 inode_unlock(inode);
294 if (likely(ret > 0)) {
295 iocb->ki_pos += ret;
296 ret = generic_write_sync(iocb, ret);
297 }
298
299 return ret;
300 }
301
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (154428 bytes)
Powered by blists - more mailing lists