From: Joel Fernandes <joel@joelfernandes.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [rcu:dev.2020.05.25a 51/63] kernel/rcu/refperf.c:298:6: warning: no previous prototype for function 'reset_readers'
Date: Tue, 26 May 2020 12:29:06 -0400 [thread overview]
Message-ID: <20200526162906.GA112595@google.com> (raw)
In-Reply-To: <20200526161117.GH2869@paulmck-ThinkPad-P72>
On Tue, May 26, 2020 at 09:11:17AM -0700, Paul E. McKenney wrote:
> On Tue, May 26, 2020 at 08:07:35PM +0800, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.05.25a
> > head: 1e9451642683146552713c5ce6d269ae378eacd5
> > commit: 786a25497743696d79592b864cafbfe48787e6e1 [51/63] refperf: Add a test to measure performance of read-side synchronization
> > config: x86_64-allyesconfig (attached as .config)
> > compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
> > 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 x86_64 cross compiling tool for clang build
> > # apt-get install binutils-x86-64-linux-gnu
> > git checkout 786a25497743696d79592b864cafbfe48787e6e1
> > # save the attached .config to linux build tree
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kbuild test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>, old ones prefixed by <<):
> >
> > >> kernel/rcu/refperf.c:298:6: warning: no previous prototype for function 'reset_readers' [-Wmissing-prototypes]
> > void reset_readers(int n)
> > ^
> > kernel/rcu/refperf.c:298:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > void reset_readers(int n)
> > ^
> > static
> > >> kernel/rcu/refperf.c:311:5: warning: no previous prototype for function 'process_durations' [-Wmissing-prototypes]
> > u64 process_durations(int n)
> > ^
> > kernel/rcu/refperf.c:311:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > u64 process_durations(int n)
> > ^
> > static
> > 2 warnings generated.
>
> Good catches, fixing!
>
> Thanx, Paul
Thanks in advance, Paul, for the fix!
- Joel
> > vim +/reset_readers +298 kernel/rcu/refperf.c
> >
> > 297
> > > 298 void reset_readers(int n)
> > 299 {
> > 300 int i;
> > 301 struct reader_task *rt;
> > 302
> > 303 for (i = 0; i < n; i++) {
> > 304 rt = &(reader_tasks[i]);
> > 305
> > 306 rt->last_duration_ns = 0;
> > 307 }
> > 308 }
> > 309
> > 310 // Print the results of each reader and return the sum of all their durations.
> > > 311 u64 process_durations(int n)
> > 312 {
> > 313 int i;
> > 314 struct reader_task *rt;
> > 315 char buf1[64];
> > 316 char buf[512];
> > 317 u64 sum = 0;
> > 318
> > 319 buf[0] = 0;
> > 320 sprintf(buf, "Experiment #%d (Format: <THREAD-NUM>:<Total loop time in ns>)",
> > 321 exp_idx);
> > 322
> > 323 for (i = 0; i <= n && !torture_must_stop(); i++) {
> > 324 rt = &(reader_tasks[i]);
> > 325 sprintf(buf1, "%d: %llu\t", i, rt->last_duration_ns);
> > 326
> > 327 if (i % 5 == 0)
> > 328 strcat(buf, "\n");
> > 329 strcat(buf, buf1);
> > 330
> > 331 sum += rt->last_duration_ns;
> > 332 }
> > 333 strcat(buf, "\n");
> > 334
> > 335 PERFOUT("%s\n", buf);
> > 336
> > 337 return sum;
> > 338 }
> > 339
> >
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
>
prev parent reply other threads:[~2020-05-26 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 12:07 [rcu:dev.2020.05.25a 51/63] kernel/rcu/refperf.c:298:6: warning: no previous prototype for function 'reset_readers' kbuild test robot
2020-05-26 12:07 ` kbuild test robot
2020-05-26 16:11 ` Paul E. McKenney
2020-05-26 16:11 ` Paul E. McKenney
2020-05-26 16:29 ` Joel Fernandes [this message]
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=20200526162906.GA112595@google.com \
--to=joel@joelfernandes.org \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=paulmck@kernel.org \
/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.