linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [cel:nfsd-courteous-server 39/39] fs/nfsd/nfs4state.c:2460:44: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'u64' {aka 'long long unsigned int'}
@ 2022-03-10  8:45 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-10  8:45 UTC (permalink / raw)
  To: Dai Ngo; +Cc: kbuild-all, linux-kernel, Chuck Lever

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: x86_64-rhel-8.3-kunit (https://download.01.org/0day-ci/archive/20220310/202203101651.SDV0fBRF-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
reproduce (this is a W=1 build):
        # 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
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/nfsd/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   fs/nfsd/nfs4state.c: In function 'client_info_show':
>> fs/nfsd/nfs4state.c:2460:44: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'u64' {aka 'long long unsigned int'} [-Wformat=]
    2460 |  seq_printf(m, "time since last renew: %02ld:%02d:%02d\n", hrs, mins, secs);
         |                                        ~~~~^               ~~~
         |                                            |               |
         |                                            long int        u64 {aka long long unsigned int}
         |                                        %02lld


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-10  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  8:45 [cel:nfsd-courteous-server 39/39] fs/nfsd/nfs4state.c:2460:44: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'u64' {aka 'long long unsigned int'} kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).