Commit 9509d264 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpi-assorted-cleanup' into acpi-cleanup

* acpi-assorted-cleanup:
  ACP / fan: trivial style cleanup
  ACPI / processor: remove superfluous pr == NULL checks
  ACPI / mm: use NUMA_NO_NODE
parents 74facaf7 568b6ad8
...@@ -281,7 +281,7 @@ static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device) ...@@ -281,7 +281,7 @@ static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device)
if (!info->enabled) if (!info->enabled)
continue; continue;
if (nid < 0) if (nid == NUMA_NO_NODE)
nid = memory_add_physaddr_to_nid(info->start_addr); nid = memory_add_physaddr_to_nid(info->start_addr);
acpi_unbind_memory_blocks(info, handle); acpi_unbind_memory_blocks(info, handle);
......
...@@ -168,7 +168,7 @@ static int acpi_fan_add(struct acpi_device *device) ...@@ -168,7 +168,7 @@ static int acpi_fan_add(struct acpi_device *device)
acpi_device_name(device), acpi_device_bid(device), acpi_device_name(device), acpi_device_bid(device),
!device->power.state ? "on" : "off"); !device->power.state ? "on" : "off");
end: end:
return result; return result;
} }
......
...@@ -73,7 +73,7 @@ int acpi_map_pxm_to_node(int pxm) ...@@ -73,7 +73,7 @@ int acpi_map_pxm_to_node(int pxm)
{ {
int node = pxm_to_node_map[pxm]; int node = pxm_to_node_map[pxm];
if (node < 0) { if (node == NUMA_NO_NODE) {
if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
return NUMA_NO_NODE; return NUMA_NO_NODE;
node = first_unset_node(nodes_found_map); node = first_unset_node(nodes_found_map);
...@@ -334,7 +334,7 @@ int acpi_get_pxm(acpi_handle h) ...@@ -334,7 +334,7 @@ int acpi_get_pxm(acpi_handle h)
int acpi_get_node(acpi_handle *handle) int acpi_get_node(acpi_handle *handle)
{ {
int pxm, node = -1; int pxm, node = NUMA_NO_NODE;
pxm = acpi_get_pxm(handle); pxm = acpi_get_pxm(handle);
if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
......
...@@ -272,9 +272,6 @@ static void tsc_check_state(int state) { return; } ...@@ -272,9 +272,6 @@ static void tsc_check_state(int state) { return; }
static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
{ {
if (!pr)
return -EINVAL;
if (!pr->pblk) if (!pr->pblk)
return -ENODEV; return -ENODEV;
...@@ -1076,12 +1073,8 @@ int acpi_processor_hotplug(struct acpi_processor *pr) ...@@ -1076,12 +1073,8 @@ int acpi_processor_hotplug(struct acpi_processor *pr)
if (disabled_by_idle_boot_param()) if (disabled_by_idle_boot_param())
return 0; return 0;
if (!pr) if (nocst)
return -EINVAL;
if (nocst) {
return -ENODEV; return -ENODEV;
}
if (!pr->flags.power_setup_done) if (!pr->flags.power_setup_done)
return -ENODEV; return -ENODEV;
...@@ -1108,9 +1101,6 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) ...@@ -1108,9 +1101,6 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
if (disabled_by_idle_boot_param()) if (disabled_by_idle_boot_param())
return 0; return 0;
if (!pr)
return -EINVAL;
if (nocst) if (nocst)
return -ENODEV; return -ENODEV;
...@@ -1183,9 +1173,6 @@ int acpi_processor_power_init(struct acpi_processor *pr) ...@@ -1183,9 +1173,6 @@ int acpi_processor_power_init(struct acpi_processor *pr)
first_run++; first_run++;
} }
if (!pr)
return -EINVAL;
if (acpi_gbl_FADT.cst_control && !nocst) { if (acpi_gbl_FADT.cst_control && !nocst) {
status = status =
acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8); acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment