Commit 2329abfa344a9a824bc4c71f2415528777265510

Authored by Rusty Russell
1 parent 6d6a55ec08

module_param: make bool parameters really bool (core code)

module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Showing 5 changed files with 9 additions and 8 deletions Side-by-side Diff

include/linux/init.h
... ... @@ -2,6 +2,7 @@
2 2 #define _LINUX_INIT_H
3 3  
4 4 #include <linux/compiler.h>
  5 +#include <linux/types.h>
5 6  
6 7 /* These macros are used to mark some functions or
7 8 * initialized data (doesn't apply to uninitialized data)
... ... @@ -156,7 +157,7 @@
156 157  
157 158 extern void (*late_time_init)(void);
158 159  
159   -extern int initcall_debug;
  160 +extern bool initcall_debug;
160 161  
161 162 #endif
162 163  
... ... @@ -648,7 +648,7 @@
648 648 #endif
649 649 }
650 650  
651   -int initcall_debug;
  651 +bool initcall_debug;
652 652 core_param(initcall_debug, initcall_debug, bool, 0644);
653 653  
654 654 static char msgbuf[64];
kernel/irq/internals.h
... ... @@ -15,7 +15,7 @@
15 15  
16 16 #define istate core_internal_state__do_not_mess_with_it
17 17  
18   -extern int noirqdebug;
  18 +extern bool noirqdebug;
19 19  
20 20 /*
21 21 * Bits used by threaded handlers:
kernel/irq/spurious.c
... ... @@ -325,7 +325,7 @@
325 325 desc->irqs_unhandled = 0;
326 326 }
327 327  
328   -int noirqdebug __read_mostly;
  328 +bool noirqdebug __read_mostly;
329 329  
330 330 int noirqdebug_setup(char *str)
331 331 {
... ... @@ -521,7 +521,7 @@
521 521 }
522 522 }
523 523  
524   -static int __read_mostly ignore_loglevel;
  524 +static bool __read_mostly ignore_loglevel;
525 525  
526 526 static int __init ignore_loglevel_setup(char *str)
527 527 {
528 528  
... ... @@ -696,9 +696,9 @@
696 696 }
697 697  
698 698 #if defined(CONFIG_PRINTK_TIME)
699   -static int printk_time = 1;
  699 +static bool printk_time = 1;
700 700 #else
701   -static int printk_time = 0;
  701 +static bool printk_time = 0;
702 702 #endif
703 703 module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
704 704  
... ... @@ -1098,7 +1098,7 @@
1098 1098 return -1;
1099 1099 }
1100 1100  
1101   -int console_suspend_enabled = 1;
  1101 +bool console_suspend_enabled = 1;
1102 1102 EXPORT_SYMBOL(console_suspend_enabled);
1103 1103  
1104 1104 static int __init console_suspend_disable(char *str)