From patchwork Tue Mar 1 16:56:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 590704 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BB8D2140180 for ; Wed, 2 Mar 2016 06:21:22 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414AbcCATVF (ORCPT ); Tue, 1 Mar 2016 14:21:05 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:43008 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbcCATVE (ORCPT ); Tue, 1 Mar 2016 14:21:04 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Mar 2016 12:21:02 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 Mar 2016 12:20:58 -0700 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-acpi@vger.kernel.org; linux-kernel@vger.kernel.org; netdev@vger.kernel.org Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 06CB719D8047; Tue, 1 Mar 2016 12:08:53 -0700 (MST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u21JKvNN15925426; Tue, 1 Mar 2016 19:20:57 GMT Received: from d01av01.pok.ibm.com (localhost [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u21JKtFl003695; Tue, 1 Mar 2016 14:20:56 -0500 Received: from paulmck-ThinkPad-W541 (sig-9-77-140-17.ibm.com [9.77.140.17]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u21JKsRp003612; Tue, 1 Mar 2016 14:20:54 -0500 Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 90CF716C2CF6; Tue, 1 Mar 2016 08:56:50 -0800 (PST) Date: Tue, 1 Mar 2016 08:56:50 -0800 From: "Paul E. McKenney" To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Andrew Morton , rjw@rjwysocki.net, konrad.wilk@oracle.com, Ingo Molnar , tj@kernel.org, davem@davemloft.net, linux-acpi@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC][PATCH] tags: Fix DEFINE_PER_CPU expansions Message-ID: <20160301165650.GN3577@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20160301102625.GQ6357@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160301102625.GQ6357@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16030119-0025-0000-0000-000021DEF779 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 01, 2016 at 11:26:25AM +0100, Peter Zijlstra wrote: > > $ make tags > GEN tags > ctags: Warning: drivers/acpi/processor_idle.c:64: null expansion of name pattern "\1" > ctags: Warning: drivers/xen/events/events_2l.c:41: null expansion of name pattern "\1" > ctags: Warning: kernel/locking/lockdep.c:151: null expansion of name pattern "\1" > ctags: Warning: kernel/rcu/rcutorture.c:133: null expansion of name pattern "\1" > ctags: Warning: kernel/rcu/rcutorture.c:135: null expansion of name pattern "\1" > ctags: Warning: kernel/workqueue.c:323: null expansion of name pattern "\1" > ctags: Warning: net/ipv4/syncookies.c:53: null expansion of name pattern "\1" > ctags: Warning: net/ipv6/syncookies.c:44: null expansion of name pattern "\1" > ctags: Warning: net/rds/page.c:45: null expansion of name pattern "\1" > > Which are all the result of the DEFINE_PER_CPU pattern: > > scripts/tags.sh:200: '/\ scripts/tags.sh:201: '/\ > The below cures them. All except the workqueue one are within reasonable > distance of the 80 char limit. TJ do you have any preference on how to > fix the wq one, or shall we just not care its too long? > > Signed-off-by: Peter Zijlstra (Intel) For rcutorture, the initializers are zero. Would it make more sense to remove the initializers completely in favor of C's default initialization as shown below? Thanx, Paul ------------------------------------------------------------------------ commit 9bd8e9f0c56cfc19ca5b68a73edd80b16bec4af8 Author: Paul E. McKenney Date: Tue Mar 1 08:52:19 2016 -0800 rcutorture: Remove redundant initialization to zero The current code initializes the global per-CPU variables rcu_torture_count and rcu_torture_batch to zero. However, C does this initialization by default, and explicit initialization of per-CPU variables now needs a different syntax if "make tags" is to work. This commit therefore removes the initialization. Reported-by: Peter Zijlstra Signed-off-by: Paul E. McKenney diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 1c2dc23ae07d..f5fd9acc0f9b 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c @@ -131,9 +131,9 @@ static unsigned long rcu_torture_current_version; static struct rcu_torture rcu_tortures[10 * RCU_TORTURE_PIPE_LEN]; static DEFINE_SPINLOCK(rcu_torture_lock); static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], - rcu_torture_count) = { 0 }; + rcu_torture_count); static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1], - rcu_torture_batch) = { 0 }; + rcu_torture_batch); static atomic_t rcu_torture_wcount[RCU_TORTURE_PIPE_LEN + 1]; static atomic_t n_rcu_torture_alloc; static atomic_t n_rcu_torture_alloc_fail;