Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1389983
| Path | csiph.com!goblin3!goblin1!goblin.stu.neva.ru!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | "tip-bot for Paul E. McKenney" <tipbot@zytor.com> |
| Newsgroups | linux.kernel |
| Subject | [tip:locking/core] lcoking/locktorture: Simplify the torture_runnable computation |
| Date | Thu, 28 Apr 2016 12:30:03 +0200 |
| Message-ID | <rsRmP-1va-41@gated-at.bofh.it> (permalink) |
| References | <rseY9-34w-1@gated-at.bofh.it> |
| Reply-To | peterz@infradead.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org |
| Git-Commit-ID | 5db4298133d99b3dfc60d6899ac9df169769c899 |
| X-Mailer | tip-git-log-daemon |
| Robot-ID | <tip-bot.git.kernel.org> |
| Robot-Unsubscribe | Contact <mailto:hpa@kernel.org> to get blacklisted from these emails |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 8bit |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Disposition | inline |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 44 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | peterz@infradead.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, paulmck@linux.vnet.ibm.com, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org |
| X-Original-Date | Thu, 28 Apr 2016 03:29:09 -0700 |
| X-Original-Message-ID | <tip-5db4298133d99b3dfc60d6899ac9df169769c899@git.kernel.org> |
| X-Original-References | <1461691328-5429-4-git-send-email-paulmck@linux.vnet.ibm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1389983 |
Show key headers only | View raw
Commit-ID: 5db4298133d99b3dfc60d6899ac9df169769c899
Gitweb: http://git.kernel.org/tip/5db4298133d99b3dfc60d6899ac9df169769c899
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
AuthorDate: Tue, 26 Apr 2016 10:22:08 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 28 Apr 2016 10:57:51 +0200
lcoking/locktorture: Simplify the torture_runnable computation
This commit replaces an #ifdef with IS_ENABLED(), saving five lines.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: corbet@lwn.net
Cc: dave@stgolabs.net
Cc: dhowells@redhat.com
Cc: linux-doc@vger.kernel.org
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1461691328-5429-4-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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 d066a50..f8c5af5 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");
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH locking 4/4] locktorture: Simplify torture_runnable computation "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-04-26 19:30 +0200 [tip:locking/core] lcoking/locktorture: Simplify the torture_runnable computation "tip-bot for Paul E. McKenney" <tipbot@zytor.com> - 2016-04-28 12:30 +0200
csiph-web