From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbcDZRWW (ORCPT ); Tue, 26 Apr 2016 13:22:22 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:36408 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752632AbcDZRVj (ORCPT ); Tue, 26 Apr 2016 13:21:39 -0400 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: paulmck@linux.vnet.ibm.com X-IBM-RcptTo: linux-doc@vger.kernel.org;linux-kernel@vger.kernel.org From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, corbet@lwn.net, peterz@infradead.org, linux-doc@vger.kernel.org, dhowells@redhat.com, will.deacon@arm.com, dave@stgolabs.net, "Paul E. McKenney" Subject: [PATCH locking 4/4] locktorture: Simplify torture_runnable computation Date: Tue, 26 Apr 2016 10:22:08 -0700 Message-Id: <1461691328-5429-4-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <20160426172041.GA4539@linux.vnet.ibm.com> References: <20160426172041.GA4539@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16042617-0013-0000-0000-000034AA4159 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit replaces a #ifdef with IS_ENABLED(), saving five lines. Signed-off-by: Paul E. McKenney --- kernel/locking/locktorture.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index d066a50dc87e..f8c5af52a131 100644 --- a/kernel/locking/locktorture.c +++ b/kernel/locking/locktorture.c @@ -75,12 +75,7 @@ struct lock_stress_stats { long n_lock_acquired; }; -#if defined(MODULE) -#define LOCKTORTURE_RUNNABLE_INIT 1 -#else -#define LOCKTORTURE_RUNNABLE_INIT 0 -#endif -int torture_runnable = LOCKTORTURE_RUNNABLE_INIT; +int torture_runnable = IS_ENABLED(MODULE); module_param(torture_runnable, int, 0444); MODULE_PARM_DESC(torture_runnable, "Start locktorture at module init"); -- 2.5.2