Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -8
+2 -1
include/linux/init.h
··· 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) ··· 157 156 158 157 extern void (*late_time_init)(void); 159 158 160 - extern int initcall_debug; 159 + extern bool initcall_debug; 161 160 162 161 #endif 163 162
+1 -1
init/main.c
··· 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];
+1 -1
kernel/irq/internals.h
··· 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:
+1 -1
kernel/irq/spurious.c
··· 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 {
+4 -4
kernel/printk.c
··· 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 { ··· 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 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)