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: 8469571 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CAE2F9F38C for ; Tue, 1 Mar 2016 19:21:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA1212034E for ; Tue, 1 Mar 2016 19:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C936B2034A for ; Tue, 1 Mar 2016 19:21:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbcCATVF (ORCPT ); Tue, 1 Mar 2016 14:21:05 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:43009 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbcCATVD (ORCPT ); Tue, 1 Mar 2016 14:21:03 -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: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;