linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	Ingo Molnar <mingo@kernel.org>, Boqun Feng <boqun.feng@gmail.com>,
	SeongJae Park <sj38.park@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcuperf: fix duplicate struct initializer
Date: Wed, 19 Apr 2017 20:45:14 +0200	[thread overview]
Message-ID: <CAK8P3a3B18HnHLxpx=ktkeEnuZiTuMqpNEanExqLaQFZ0SeD_w@mail.gmail.com> (raw)
In-Reply-To: <20170419181548.GV3956@linux.vnet.ibm.com>

On Wed, Apr 19, 2017 at 8:15 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> On Wed, Apr 19, 2017 at 07:14:34PM +0200, Arnd Bergmann wrote:
>> Building with "make W=1" shows a set of new warnings in the rcuperf code:
>>
>> kernel/rcu/rcuperf.c:282:11: error: initialized field overwritten [-Werror=override-init]
>>   .async  = srcu_call_rcu,
>> kernel/rcu/rcuperf.c:282:11: note: (near initialization for 'sched_ops.async')
>> kernel/rcu/rcuperf.c:283:16: error: initialized field overwritten [-Werror=override-init]
>>   .gp_barrier = srcu_rcu_barrier,
>> kernel/rcu/rcuperf.c:283:16: note: (near initialization for 'sched_ops.gp_barrier')
>> kernel/rcu/rcuperf.c:313:11: error: initialized field overwritten [-Werror=override-init]
>>   .async  = call_rcu_tasks,
>> kernel/rcu/rcuperf.c:313:11: note: (near initialization for 'tasks_ops.async')
>> kernel/rcu/rcuperf.c:314:16: error: initialized field overwritten [-Werror=override-init]
>>   .gp_barrier = rcu_barrier_tasks,
>> kernel/rcu/rcuperf.c:314:16: note: (near initialization for 'tasks_ops.gp_barrier')
>>
>> This appears to be a copy-paste bug, so we can remove the extranous copy.
>>
>> Fixes: f743d20f2cc6 ("rcuperf: Add ability to performance-test call_rcu() and friends")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> For those times when you want to be -really- sure that the field is in
> fact initialized!  ;-)
>
> Good catch!!!  I merged this into the original commit with attribution:
>
> [ paulmck: Removed the redundant initialization noted by Arnd Bergmann. ]

Thanks!

Note that one of them was not redundant but actually incorrect, as it
replaced the _rcu_sched variant with the srcu_ variant.

       Arnd

  reply	other threads:[~2017-04-19 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 17:14 [PATCH] rcuperf: fix duplicate struct initializer Arnd Bergmann
2017-04-19 18:15 ` Paul E. McKenney
2017-04-19 18:45   ` Arnd Bergmann [this message]
2017-04-19 19:11     ` Joe Perches

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='CAK8P3a3B18HnHLxpx=ktkeEnuZiTuMqpNEanExqLaQFZ0SeD_w@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=sj38.park@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 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).