Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1387737
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH locking 4/4] locktorture: Simplify torture_runnable computation |
| Date | 2016-04-26 19:30 +0200 |
| Message-ID | <rseY9-34w-1@gated-at.bofh.it> (permalink) |
| References | <rseY9-34w-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This commit replaces a #ifdef with IS_ENABLED(), saving five lines.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
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
Back to linux.kernel | Previous | Next — Next 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