Skip to content

Commit 90ab5ee

Browse files
committed
module_param: make bool parameters really bool (drivers & misc)
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 <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 476bc00 commit 90ab5ee

283 files changed

Lines changed: 471 additions & 465 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/accessibility/braille/braille_console.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ MODULE_LICENSE("GPL");
4444
*/
4545

4646
/* Emit various sounds */
47-
static int sound;
47+
static bool sound;
4848
module_param(sound, bool, 0);
4949
MODULE_PARM_DESC(sound, "emit sounds");
5050

‎drivers/acpi/acpica/acglobal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
108108
/*
109109
* Optionally enable output from the AML Debug Object.
110110
*/
111-
u32 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
111+
bool ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
112112

113113
/*
114114
* Optionally copy the entire DSDT to local memory (instead of simply

‎drivers/acpi/apei/ghes.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct ghes_estatus_cache {
118118
struct rcu_head rcu;
119119
};
120120

121-
int ghes_disable;
121+
bool ghes_disable;
122122
module_param_named(disable, ghes_disable, bool, 0);
123123

124124
static int ghes_panic_timeout __read_mostly = 30;

‎drivers/acpi/apei/hest.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
#define HEST_PFX "HEST: "
4343

44-
int hest_disable;
44+
bool hest_disable;
4545
EXPORT_SYMBOL_GPL(hest_disable);
4646

4747
/* HEST table parsing */

‎drivers/acpi/dock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ MODULE_AUTHOR("Kristen Carlson Accardi");
4343
MODULE_DESCRIPTION(ACPI_DOCK_DRIVER_DESCRIPTION);
4444
MODULE_LICENSE("GPL");
4545

46-
static int immediate_undock = 1;
46+
static bool immediate_undock = 1;
4747
module_param(immediate_undock, bool, 0644);
4848
MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to "
4949
"undock immediately when the undock button is pressed, 0 will cause"

‎drivers/acpi/pci_slot.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <acpi/acpi_drivers.h>
3535
#include <linux/dmi.h>
3636

37-
static int debug;
37+
static bool debug;
3838
static int check_sta_before_sun;
3939

4040
#define DRIVER_VERSION "0.1"

‎drivers/acpi/video.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,21 @@ MODULE_AUTHOR("Bruno Ducrot");
6969
MODULE_DESCRIPTION("ACPI Video Driver");
7070
MODULE_LICENSE("GPL");
7171

72-
static int brightness_switch_enabled = 1;
72+
static bool brightness_switch_enabled = 1;
7373
module_param(brightness_switch_enabled, bool, 0644);
7474

7575
/*
7676
* By default, we don't allow duplicate ACPI video bus devices
7777
* under the same VGA controller
7878
*/
79-
static int allow_duplicates;
79+
static bool allow_duplicates;
8080
module_param(allow_duplicates, bool, 0644);
8181

8282
/*
8383
* Some BIOSes claim they use minimum backlight at boot,
8484
* and this may bring dimming screen after boot
8585
*/
86-
static int use_bios_initial_backlight = 1;
86+
static bool use_bios_initial_backlight = 1;
8787
module_param(use_bios_initial_backlight, bool, 0644);
8888

8989
static int register_count = 0;

‎drivers/ata/sata_nv.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ MODULE_LICENSE("GPL");
599599
MODULE_DEVICE_TABLE(pci, nv_pci_tbl);
600600
MODULE_VERSION(DRV_VERSION);
601601

602-
static int adma_enabled;
603-
static int swncq_enabled = 1;
604-
static int msi_enabled;
602+
static bool adma_enabled;
603+
static bool swncq_enabled = 1;
604+
static bool msi_enabled;
605605

606606
static void nv_adma_register_mode(struct ata_port *ap)
607607
{

‎drivers/ata/sata_sil24.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static struct ata_port_operations sil24_ops = {
417417
#endif
418418
};
419419

420-
static int sata_sil24_msi; /* Disable MSI */
420+
static bool sata_sil24_msi; /* Disable MSI */
421421
module_param_named(msi, sata_sil24_msi, bool, S_IRUGO);
422422
MODULE_PARM_DESC(msi, "Enable MSI (Default: false)");
423423

‎drivers/atm/he.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ static u8 read_prom_byte(struct he_dev *he_dev, int addr);
112112
/* globals */
113113

114114
static struct he_dev *he_devs;
115-
static int disable64;
115+
static bool disable64;
116116
static short nvpibits = -1;
117117
static short nvcibits = -1;
118118
static short rx_skb_reserve = 16;
119-
static int irq_coalesce = 1;
120-
static int sdh = 0;
119+
static bool irq_coalesce = 1;
120+
static bool sdh = 0;
121121

122122
/* Read from EEPROM = 0000 0011b */
123123
static unsigned int readtab[] = {

0 commit comments

Comments
 (0)