ACPI: Convert int variable to bool and propagate to function parameters
Subsystems (2)
PATCH 2/4 ACPI: Convert int variable to bool and propagate to function parameters
Signed-off-by Quentin Lambert <[email protected]>
--- drivers/acpi/acpi_processor.c | 5 +++-- drivers/acpi/acpica/acutils.h | 3 ++- drivers/acpi/acpica/utaddress.c | 3 ++- drivers/acpi/acpica/utxface.c | 2 +- drivers/acpi/osl.c | 4 ++-- drivers/acpi/processor_core.c | 12 ++++++------ drivers/acpi/processor_pdc.c | 5 +++-- 7 files changed, 19 insertions(+), 15 deletions(-)
drivers/acpi/acpi_processor.c +3 -2
@@ -215,7 +215,8 @@ static int acpi_processor_get_info(struct acpi_device *device)union acpi_object object = {0 };struct acpi_buffer buffer = {sizeof (union acpi_object ), &object };struct acpi_processor *pr =acpi_driver_data (device); -int phys_id, cpu_index, device_declaration =0 ; +bool device_declaration = false; +int phys_id, cpu_index;acpi_status status =AE_OK ;static int cpu0_initialized;unsigned long long value;
@@ -258,7 +259,7 @@ static int acpi_processor_get_info(struct acpi_device *device) status);return -ENODEV ; } - device_declaration =1 ; + device_declaration = true; pr->acpi_id = value; }
drivers/acpi/acpica/acutils.h +2 -1
@@ -718,7 +718,8 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,u32 acpi_ut_check_address_range (acpi_adr_space_type space_id, -acpi_physical_address address,u32 length,u8 warn); +acpi_physical_address address,u32 length, +bool warn);void acpi_ut_delete_address_lists (void );
drivers/acpi/acpica/utaddress.c +2 -1
@@ -203,7 +203,8 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,u32 acpi_ut_check_address_range (acpi_adr_space_type space_id, -acpi_physical_address address,u32 length,u8 warn) +acpi_physical_address address,u32 length, +bool warn) {struct acpi_address_range *range_info;acpi_physical_address end_address;
drivers/acpi/acpica/utxface.c +1 -1
@@ -473,7 +473,7 @@ acpi_status acpi_update_interfaces(u8 action)u32 acpi_check_address_range (acpi_adr_space_type space_id,acpi_physical_address address, -acpi_size length,u8 warn) +acpi_size length,bool warn) {u32 overlaps;acpi_status status;
drivers/acpi/osl.c +2 -2
@@ -1629,7 +1629,7 @@ int acpi_check_resource_conflict(const struct resource *res) {acpi_adr_space_type space_id;acpi_size length; -u8 warn =0 ; +bool warn = false;int clash =0 ;if (acpi_enforce_resources ==ENFORCE_RESOURCES_NO )
@@ -1644,7 +1644,7 @@ int acpi_check_resource_conflict(const struct resource *res) length =resource_size (res);if (acpi_enforce_resources !=ENFORCE_RESOURCES_NO ) - warn =1 ; + warn = true; clash =acpi_check_address_range (space_id, res->start, length, warn);if (clash) {
drivers/acpi/processor_core.c +6 -6
@@ -29,7 +29,7 @@ static int map_lapic_id(struct acpi_subtable_header *entry, }static int map_x2apic_id (struct acpi_subtable_header *entry, -int device_declaration,u32 acpi_id,int *apic_id) +bool device_declaration,u32 acpi_id,int *apic_id) {struct acpi_madt_local_x2apic *apic = container_of(entry, struct acpi_madt_local_x2apic, header);
@@ -46,7 +46,7 @@ static int map_x2apic_id(struct acpi_subtable_header *entry, }static int map_lsapic_id (struct acpi_subtable_header *entry, -int device_declaration,u32 acpi_id,int *apic_id) +bool device_declaration,u32 acpi_id,int *apic_id) {struct acpi_madt_local_sapic *lsapic = container_of(entry, struct acpi_madt_local_sapic, header);
@@ -64,7 +64,7 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,return 0 ; } -static int map_madt_entry (int type,u32 acpi_id) +static int map_madt_entry (bool type,u32 acpi_id) {unsigned long madt_end, entry;static struct acpi_table_madt *madt;
@@ -105,7 +105,7 @@ static int map_madt_entry(int type, u32 acpi_id)return phys_id; } -static int map_mat_entry (acpi_handle handle,int type,u32 acpi_id) +static int map_mat_entry (acpi_handle handle,bool type,u32 acpi_id) {struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER ,NULL };union acpi_object *obj;
@@ -137,7 +137,7 @@ exit:return phys_id; } -int acpi_get_phys_id (acpi_handle handle,int type,u32 acpi_id) +int acpi_get_phys_id (acpi_handle handle,bool type,u32 acpi_id) {int phys_id;
@@ -194,7 +194,7 @@ int acpi_map_cpuid(int phys_id, u32 acpi_id)return -1 ; } -int acpi_get_cpuid (acpi_handle handle,int type,u32 acpi_id) +int acpi_get_cpuid (acpi_handle handle,bool type,u32 acpi_id) {int phys_id;
drivers/acpi/processor_pdc.c +3 -2
@@ -20,7 +20,8 @@ ACPI_MODULE_NAME("processor_pdc");static bool __init processor_physically_present (acpi_handle handle) { -int cpuid, type; +bool type; +int cpuid;u32 acpi_id;acpi_status status;acpi_object_type acpi_type;
@@ -49,7 +50,7 @@ static bool __init processor_physically_present(acpi_handle handle)return false; } - type = (acpi_type ==ACPI_TYPE_DEVICE ) ?1 :0 ; + type = (acpi_type ==ACPI_TYPE_DEVICE ) ? true : false; cpuid =acpi_get_cpuid (handle, type, acpi_id);if (cpuid ==-1 )
Signature · 1 line
1.9.1