[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203101509.pWJbkMAO-lkp@intel.com>
Date: Thu, 10 Mar 2022 15:12:45 +0800
From: kernel test robot <lkp@...el.com>
To: Dai Ngo <dai.ngo@...cle.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Chuck Lever <chuck.lever@...cle.com>
Subject: [cel:nfsd-courteous-server 39/39] fs/nfsd/nfs4state.c:2460:60:
warning: format specifies type 'long' but the argument has type 'u64' (aka
'unsigned long long')
tree: git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-courteous-server
head: 25cf03b50a8a38217a4e1a9b178af4d9afa2b9ea
commit: 25cf03b50a8a38217a4e1a9b178af4d9afa2b9ea [39/39] NFSD: Show state of courtesy clients in client info
config: arm-colibri_pxa270_defconfig (https://download.01.org/0day-ci/archive/20220310/202203101509.pWJbkMAO-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/commit/?id=25cf03b50a8a38217a4e1a9b178af4d9afa2b9ea
git remote add cel git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
git fetch --no-tags cel nfsd-courteous-server
git checkout 25cf03b50a8a38217a4e1a9b178af4d9afa2b9ea
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash fs/nfsd/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> fs/nfsd/nfs4state.c:2460:60: warning: format specifies type 'long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
seq_printf(m, "time since last renew: %02ld:%02d:%02d\n", hrs, mins, secs);
~~~~~ ^~~
%02llu
1 warning generated.
vim +2460 fs/nfsd/nfs4state.c
2437
2438 static int client_info_show(struct seq_file *m, void *v)
2439 {
2440 struct inode *inode = m->private;
2441 struct nfs4_client *clp;
2442 u64 clid, hrs;
2443 u32 mins, secs;
2444
2445 clp = get_nfsdfs_clp(inode);
2446 if (!clp)
2447 return -ENXIO;
2448 memcpy(&clid, &clp->cl_clientid, sizeof(clid));
2449 seq_printf(m, "clientid: 0x%llx\n", clid);
2450 seq_printf(m, "address: \"%pISpc\"\n", (struct sockaddr *)&clp->cl_addr);
2451 if (test_bit(NFSD4_CLIENT_CONFIRMED, &clp->cl_flags))
2452 seq_puts(m, "status: confirmed\n");
2453 else
2454 seq_puts(m, "status: unconfirmed\n");
2455 seq_printf(m, "courtesy client: %s\n",
2456 test_bit(NFSD4_CLIENT_COURTESY, &clp->cl_flags) ? "yes" : "no");
2457 hrs = div_u64_rem(ktime_get_boottime_seconds() - clp->cl_time,
2458 3600, &secs);
2459 mins = div_u64_rem((u64)secs, 60, &secs);
> 2460 seq_printf(m, "time since last renew: %02ld:%02d:%02d\n", hrs, mins, secs);
2461 seq_printf(m, "name: ");
2462 seq_quote_mem(m, clp->cl_name.data, clp->cl_name.len);
2463 seq_printf(m, "\nminor version: %d\n", clp->cl_minorversion);
2464 if (clp->cl_nii_domain.data) {
2465 seq_printf(m, "Implementation domain: ");
2466 seq_quote_mem(m, clp->cl_nii_domain.data,
2467 clp->cl_nii_domain.len);
2468 seq_printf(m, "\nImplementation name: ");
2469 seq_quote_mem(m, clp->cl_nii_name.data, clp->cl_nii_name.len);
2470 seq_printf(m, "\nImplementation time: [%lld, %ld]\n",
2471 clp->cl_nii_time.tv_sec, clp->cl_nii_time.tv_nsec);
2472 }
2473 seq_printf(m, "callback state: %s\n", cb_state2str(clp->cl_cb_state));
2474 seq_printf(m, "callback address: %pISpc\n", &clp->cl_cb_conn.cb_addr);
2475 drop_client(clp);
2476
2477 return 0;
2478 }
2479
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists