All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 2976/2976] fs/nfs/enfs/pm_ping.c:196:6: warning: no previous prototype for function 'enfs_test_reconnect_time'
Date: Fri, 17 Oct 2025 10:58:53 +0800	[thread overview]
Message-ID: <202510171010.KAuyBISF-lkp@intel.com> (raw)

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   65461ffb14372269f333f0e18867775c14741e76
commit: 1c9eb515727c21c6c7b8212f40c006d656473bb6 [2976/2976] nfs/enfs: introduce reconnect time KUnit tests
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251017/202510171010.KAuyBISF-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510171010.KAuyBISF-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510171010.KAuyBISF-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/nfs/enfs/pm_ping.c:196:6: warning: no previous prototype for function 'enfs_test_reconnect_time' [-Wmissing-prototypes]
     196 | bool enfs_test_reconnect_time(void)
         |      ^
   fs/nfs/enfs/pm_ping.c:196:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     196 | bool enfs_test_reconnect_time(void)
         | ^
         | static 
   1 warning generated.


vim +/enfs_test_reconnect_time +196 fs/nfs/enfs/pm_ping.c

   194	
   195	#if IS_ENABLED(CONFIG_ENFS_KUNIT_TEST)
 > 196	bool enfs_test_reconnect_time(void)
   197	{
   198		bool ret = true;
   199		bool match;
   200		s64 begin_ms = ktime_to_ms(ktime_get());
   201		s64 ms;
   202		unsigned int cookie = 1;
   203		struct enfs_reconnect_time time = {
   204			.head = 0,
   205			.tail = 0,
   206			.xprt_cookie = 0,
   207		};
   208	
   209		enfs_log_info("begin time: %lld ms\n", begin_ms);
   210	
   211		ms = begin_ms;
   212		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   213		enfs_update_reconnect_time(&time, ms, cookie);
   214		match = enfs_is_time_buf_empty(&time);
   215		if (!match)
   216			return false;
   217	
   218		ms = begin_ms + 1000;
   219		cookie += 1;
   220		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   221		enfs_update_reconnect_time(&time, ms, cookie);
   222		match = time.head == 1 && time.tail == 0;
   223		if (!match)
   224			return false;
   225	
   226		ms = begin_ms + 2000;
   227		cookie += 1;
   228		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   229		enfs_update_reconnect_time(&time, ms, cookie);
   230		match = time.head == 2 && time.tail == 0;
   231		if (!match)
   232			return false;
   233	
   234		ms = begin_ms + 3000;
   235		cookie += 1;
   236		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   237		enfs_update_reconnect_time(&time, ms, cookie);
   238		match = time.head == 3 && time.tail == 0;
   239		if (!match)
   240			return false;
   241	
   242		ms = begin_ms + 4000;
   243		cookie += 1;
   244		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   245		enfs_update_reconnect_time(&time, ms, cookie);
   246		match = time.head == 0 && time.tail == 1;
   247		if (!match)
   248			return false;
   249		match = enfs_is_time_buf_full(&time);
   250		if (!match)
   251			return false;
   252	
   253		ms = begin_ms + 5000;
   254		/* cookie remains unchanged */
   255		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   256		enfs_update_reconnect_time(&time, ms, cookie);
   257		match = time.head == 0 && time.tail == 1;
   258		if (!match)
   259			return false;
   260	
   261		ms = begin_ms + 5000 + ENFS_UNSTABLE_STATE_TIMEOUT * 1000 + 1;
   262		cookie += 1;
   263		enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
   264		enfs_update_reconnect_time(&time, ms, cookie);
   265		match = time.head == 1 && time.tail == 0;
   266		if (!match)
   267			return false;
   268	
   269		return ret;
   270	}
   271	#endif
   272	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-10-17  2:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202510171010.KAuyBISF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.