From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S969210AbdDSTL3 (ORCPT ); Wed, 19 Apr 2017 15:11:29 -0400 Received: from smtprelay0243.hostedemail.com ([216.40.44.243]:51020 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S967256AbdDSTL1 (ORCPT ); Wed, 19 Apr 2017 15:11:27 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:6691:7875:7903:8957:9040:10004:10400:10848:11026:11232:11658:11914:12296:12740:12760:12895:13069:13138:13231:13311:13357:13439:14181:14659:14721:21063:21080:21451:30012:30054:30060:30079:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: jewel96_b702bb854716 X-Filterd-Recvd-Size: 3175 Message-ID: <1492629077.8661.68.camel@perches.com> Subject: Re: [PATCH] rcuperf: fix duplicate struct initializer From: Joe Perches To: Arnd Bergmann , "Paul E. McKenney" Cc: Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Wei Yongjun , Ingo Molnar , Boqun Feng , SeongJae Park , Linux Kernel Mailing List Date: Wed, 19 Apr 2017 12:11:17 -0700 In-Reply-To: References: <20170419171459.3250665-1-arnd@arndb.de> <20170419181548.GV3956@linux.vnet.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-04-19 at 20:45 +0200, Arnd Bergmann wrote: > On Wed, Apr 19, 2017 at 8:15 PM, Paul E. McKenney > 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 > > > > 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. Perhaps that should be mentioned in the changelog.