Skip to content

Commit

Permalink
module_param: make bool parameters really bool (drivers & misc)
Browse files Browse the repository at this point in the history
module_param(bool) used to counter-intuitively take an int.  In
fddd520 (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.

Acked-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jan 12, 2012
1 parent 476bc00 commit 90ab5ee
Show file tree
Hide file tree
Showing 283 changed files with 471 additions and 465 deletions.
2 changes: 1 addition & 1 deletion drivers/accessibility/braille/braille_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ MODULE_LICENSE("GPL");
*/

/* Emit various sounds */
static int sound;
static bool sound;
module_param(sound, bool, 0);
MODULE_PARM_DESC(sound, "emit sounds");

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
/*
* Optionally enable output from the AML Debug Object.
*/
u32 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
bool ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);

/*
* Optionally copy the entire DSDT to local memory (instead of simply
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/apei/ghes.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ struct ghes_estatus_cache {
struct rcu_head rcu;
};

int ghes_disable;
bool ghes_disable;
module_param_named(disable, ghes_disable, bool, 0);

static int ghes_panic_timeout __read_mostly = 30;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/apei/hest.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#define HEST_PFX "HEST: "

int hest_disable;
bool hest_disable;
EXPORT_SYMBOL_GPL(hest_disable);

/* HEST table parsing */
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ MODULE_AUTHOR("Kristen Carlson Accardi");
MODULE_DESCRIPTION(ACPI_DOCK_DRIVER_DESCRIPTION);
MODULE_LICENSE("GPL");

static int immediate_undock = 1;
static bool immediate_undock = 1;
module_param(immediate_undock, bool, 0644);
MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to "
"undock immediately when the undock button is pressed, 0 will cause"
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/pci_slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <acpi/acpi_drivers.h>
#include <linux/dmi.h>

static int debug;
static bool debug;
static int check_sta_before_sun;

#define DRIVER_VERSION "0.1"
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,21 @@ MODULE_AUTHOR("Bruno Ducrot");
MODULE_DESCRIPTION("ACPI Video Driver");
MODULE_LICENSE("GPL");

static int brightness_switch_enabled = 1;
static bool brightness_switch_enabled = 1;
module_param(brightness_switch_enabled, bool, 0644);

/*
* By default, we don't allow duplicate ACPI video bus devices
* under the same VGA controller
*/
static int allow_duplicates;
static bool allow_duplicates;
module_param(allow_duplicates, bool, 0644);

/*
* Some BIOSes claim they use minimum backlight at boot,
* and this may bring dimming screen after boot
*/
static int use_bios_initial_backlight = 1;
static bool use_bios_initial_backlight = 1;
module_param(use_bios_initial_backlight, bool, 0644);

static int register_count = 0;
Expand Down
6 changes: 3 additions & 3 deletions drivers/ata/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,9 @@ MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, nv_pci_tbl);
MODULE_VERSION(DRV_VERSION);

static int adma_enabled;
static int swncq_enabled = 1;
static int msi_enabled;
static bool adma_enabled;
static bool swncq_enabled = 1;
static bool msi_enabled;

static void nv_adma_register_mode(struct ata_port *ap)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static struct ata_port_operations sil24_ops = {
#endif
};

static int sata_sil24_msi; /* Disable MSI */
static bool sata_sil24_msi; /* Disable MSI */
module_param_named(msi, sata_sil24_msi, bool, S_IRUGO);
MODULE_PARM_DESC(msi, "Enable MSI (Default: false)");

Expand Down
6 changes: 3 additions & 3 deletions drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ static u8 read_prom_byte(struct he_dev *he_dev, int addr);
/* globals */

static struct he_dev *he_devs;
static int disable64;
static bool disable64;
static short nvpibits = -1;
static short nvcibits = -1;
static short rx_skb_reserve = 16;
static int irq_coalesce = 1;
static int sdh = 0;
static bool irq_coalesce = 1;
static bool sdh = 0;

/* Read from EEPROM = 0000 0011b */
static unsigned int readtab[] = {
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@

/* module parameter, defined in drbd_main.c */
extern unsigned int minor_count;
extern int disable_sendpage;
extern int allow_oos;
extern bool disable_sendpage;
extern bool allow_oos;
extern unsigned int cn_idx;

#ifdef CONFIG_DRBD_FAULT_INJECTION
Expand Down
4 changes: 2 additions & 2 deletions drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ module_param(fault_devs, int, 0644);

/* module parameter, defined */
unsigned int minor_count = DRBD_MINOR_COUNT_DEF;
int disable_sendpage;
int allow_oos;
bool disable_sendpage;
bool allow_oos;
unsigned int cn_idx = CN_IDX_DRBD;
int proc_details; /* Detail level in proc drbd*/

Expand Down
5 changes: 2 additions & 3 deletions drivers/block/paride/bpck6.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/


/* PARAMETERS */
static int verbose; /* set this to 1 to see debugging messages and whatnot */

#define BACKPACK_VERSION "2.0.2"

#include <linux/module.h>
Expand All @@ -36,6 +33,8 @@ static int verbose; /* set this to 1 to see debugging messages and whatnot */
#include "ppc6lnx.c"
#include "paride.h"

/* PARAMETERS */
static bool verbose; /* set this to 1 to see debugging messages and whatnot */


#define PPCSTRUCT(pi) ((Interface *)(pi->private))
Expand Down
3 changes: 2 additions & 1 deletion drivers/block/paride/pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@
by default.
*/
#include <linux/types.h>

static int verbose = 0;
static bool verbose = 0;
static int major = PD_MAJOR;
static char *name = PD_NAME;
static int cluster = 64;
Expand Down
4 changes: 3 additions & 1 deletion drivers/block/paride/pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,15 @@
#define PF_NAME "pf"
#define PF_UNITS 4

#include <linux/types.h>

/* Here are things one can override from the insmod command.
Most are autoprobed by paride unless set here. Verbose is off
by default.
*/

static int verbose = 0;
static bool verbose = 0;
static int major = PF_MAJOR;
static char *name = PF_NAME;
static int cluster = 64;
Expand Down
3 changes: 2 additions & 1 deletion drivers/block/paride/pg.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@
#define PI_PG 4
#endif

#include <linux/types.h>
/* Here are things one can override from the insmod command.
Most are autoprobed by paride unless set here. Verbose is 0
by default.
*/

static int verbose = 0;
static bool verbose = 0;
static int major = PG_MAJOR;
static char *name = PG_NAME;
static int disable = 0;
Expand Down
4 changes: 3 additions & 1 deletion drivers/block/paride/pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@
#define PT_NAME "pt"
#define PT_UNITS 4

#include <linux/types.h>

/* Here are things one can override from the insmod command.
Most are autoprobed by paride unless set here. Verbose is on
by default.
*/

static int verbose = 0;
static bool verbose = 0;
static int major = PT_MAJOR;
static char *name = PT_NAME;
static int disable = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/block/xd.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static volatile int xdc_busy;
static struct timer_list xd_watchdog_int;

static volatile u_char xd_error;
static int nodma = XD_DONT_USE_DMA;
static bool nodma = XD_DONT_USE_DMA;

static struct request_queue *xd_queue;

Expand Down
12 changes: 6 additions & 6 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@

#define VERSION "0.6"

static int ignore_dga;
static int ignore_csr;
static int ignore_sniffer;
static int disable_scofix;
static int force_scofix;
static bool ignore_dga;
static bool ignore_csr;
static bool ignore_sniffer;
static bool disable_scofix;
static bool force_scofix;

static int reset = 1;
static bool reset = 1;

static struct usb_driver btusb_driver;

Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci_bcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@

#define VERSION "0.3"

static int txcrc = 1;
static int hciextn = 1;
static bool txcrc = 1;
static bool hciextn = 1;

#define BCSP_TXWINSIZE 4

Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

#define VERSION "2.2"

static int reset = 0;
static bool reset = 0;

static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];

Expand Down
12 changes: 6 additions & 6 deletions drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,17 @@
#include <asm/uaccess.h>

/* used to tell the module to turn on full debugging messages */
static int debug;
static bool debug;
/* used to keep tray locked at all times */
static int keeplocked;
/* default compatibility mode */
static int autoclose=1;
static int autoeject;
static int lockdoor = 1;
static bool autoclose=1;
static bool autoeject;
static bool lockdoor = 1;
/* will we ever get to use this... sigh. */
static int check_media_type;
static bool check_media_type;
/* automatically restart mrw format */
static int mrw_format_restart = 1;
static bool mrw_format_restart = 1;
module_param(debug, bool, 0);
module_param(autoclose, bool, 0);
module_param(autoeject, bool, 0);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/amd64-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define ULI_X86_64_ENU_SCR_REG 0x54

static struct resource *aperture_resource;
static int __initdata agp_try_unsupported = 1;
static bool __initdata agp_try_unsupported = 1;
static int agp_bridges_found;

static void amd64_tlbflush(struct agp_memory *temp)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/agp/sis-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define PCI_DEVICE_ID_SI_662 0x0662
#define PCI_DEVICE_ID_SI_671 0x0671

static int __devinitdata agp_sis_force_delay = 0;
static bool __devinitdata agp_sis_force_delay = 0;
static int __devinitdata agp_sis_agp_spec = -1;

static int sis_fetch_size(void)
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/i8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ MODULE_AUTHOR("Massimo Dal Zotto ([email protected])");
MODULE_DESCRIPTION("Driver for accessing SMM BIOS on Dell laptops");
MODULE_LICENSE("GPL");

static int force;
static bool force;
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Force loading without checking for supported models");

static int ignore_dmi;
static bool ignore_dmi;
module_param(ignore_dmi, bool, 0);
MODULE_PARM_DESC(ignore_dmi, "Continue probing hardware even if DMI data does not match");

static int restricted;
static bool restricted;
module_param(restricted, bool, 0);
MODULE_PARM_DESC(restricted, "Allow fan control if SYS_ADMIN capability set");

static int power_status;
static bool power_status;
module_param(power_status, bool, 0600);
MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k");

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ static int smi_num; /* Used to sequence the SMIs */
#define DEFAULT_REGSPACING 1
#define DEFAULT_REGSIZE 1

static int si_trydefaults = 1;
static bool si_trydefaults = 1;
static char *si_type[SI_MAX_PARMS];
#define MAX_SI_TYPE_STR 30
static char si_type_str[MAX_SI_TYPE_STR];
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/lp.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static struct console lpcons = {

static int parport_nr[LP_NO] = { [0 ... LP_NO-1] = LP_PARPORT_UNSPEC };
static char *parport[LP_NO];
static int reset;
static bool reset;

module_param_array(parport, charp, NULL, 0);
module_param(reset, bool, 0);
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/nwflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int write_block(unsigned long p, const char __user *buf, int count);
#define KFLASH_ID 0x89A6 //Intel flash
#define KFLASH_ID4 0xB0D4 //Intel flash 4Meg

static int flashdebug; //if set - we will display progress msgs
static bool flashdebug; //if set - we will display progress msgs

static int gbWriteEnable;
static int gbWriteBase64Enable;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/pcmcia/synclink_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ static int mgslpc_device_count = 0;
* .text section address and breakpoint on module load.
* This is useful for use with gdb and add-symbol-file command.
*/
static int break_on_load=0;
static bool break_on_load=0;

/*
* Driver major number, defaults to zero to get auto
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static DECLARE_WAIT_QUEUE_HEAD(random_write_wait);
static struct fasync_struct *fasync;

#if 0
static int debug;
static bool debug;
module_param(debug, bool, 0644);
#define DEBUG_ENT(fmt, arg...) do { \
if (debug) \
Expand Down
Loading

0 comments on commit 90ab5ee

Please sign in to comment.