diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:41:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:41:24 -0400 |
commit | 9509d264add9a32d48fa9c76cd0ef65e0f734aa9 (patch) | |
tree | 2fe91a5570d5b7d17503b5df6b6fbf90898dce94 | |
parent | 74facaf75d3de2dd81193d907d0bee050c259f0c (diff) | |
parent | 568b6ad834e90351f1a1e6e6cf93bf0e0d8a0eae (diff) |
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
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 2 | ||||
-rw-r--r-- | drivers/acpi/fan.c | 2 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 15 |
4 files changed, 5 insertions, 18 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 999adb5499c7..c00a3a73409b 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -281,7 +281,7 @@ static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device) | |||
281 | if (!info->enabled) | 281 | if (!info->enabled) |
282 | continue; | 282 | continue; |
283 | 283 | ||
284 | if (nid < 0) | 284 | if (nid == NUMA_NO_NODE) |
285 | nid = memory_add_physaddr_to_nid(info->start_addr); | 285 | nid = memory_add_physaddr_to_nid(info->start_addr); |
286 | 286 | ||
287 | acpi_unbind_memory_blocks(info, handle); | 287 | acpi_unbind_memory_blocks(info, handle); |
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 41ade6570bc0..ba3da88cee45 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -168,7 +168,7 @@ static int acpi_fan_add(struct acpi_device *device) | |||
168 | acpi_device_name(device), acpi_device_bid(device), | 168 | acpi_device_name(device), acpi_device_bid(device), |
169 | !device->power.state ? "on" : "off"); | 169 | !device->power.state ? "on" : "off"); |
170 | 170 | ||
171 | end: | 171 | end: |
172 | return result; | 172 | return result; |
173 | } | 173 | } |
174 | 174 | ||
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 2e82e5d76930..a2343a1d9e0b 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -73,7 +73,7 @@ int acpi_map_pxm_to_node(int pxm) | |||
73 | { | 73 | { |
74 | int node = pxm_to_node_map[pxm]; | 74 | int node = pxm_to_node_map[pxm]; |
75 | 75 | ||
76 | if (node < 0) { | 76 | if (node == NUMA_NO_NODE) { |
77 | if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) | 77 | if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) |
78 | return NUMA_NO_NODE; | 78 | return NUMA_NO_NODE; |
79 | node = first_unset_node(nodes_found_map); | 79 | node = first_unset_node(nodes_found_map); |
@@ -334,7 +334,7 @@ int acpi_get_pxm(acpi_handle h) | |||
334 | 334 | ||
335 | int acpi_get_node(acpi_handle *handle) | 335 | int acpi_get_node(acpi_handle *handle) |
336 | { | 336 | { |
337 | int pxm, node = -1; | 337 | int pxm, node = NUMA_NO_NODE; |
338 | 338 | ||
339 | pxm = acpi_get_pxm(handle); | 339 | pxm = acpi_get_pxm(handle); |
340 | if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) | 340 | if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index f98dd00b51a9..35c8f2bbcc40 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -272,9 +272,6 @@ static void tsc_check_state(int state) { return; } | |||
272 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | 272 | static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) |
273 | { | 273 | { |
274 | 274 | ||
275 | if (!pr) | ||
276 | return -EINVAL; | ||
277 | |||
278 | if (!pr->pblk) | 275 | if (!pr->pblk) |
279 | return -ENODEV; | 276 | return -ENODEV; |
280 | 277 | ||
@@ -1076,12 +1073,8 @@ int acpi_processor_hotplug(struct acpi_processor *pr) | |||
1076 | if (disabled_by_idle_boot_param()) | 1073 | if (disabled_by_idle_boot_param()) |
1077 | return 0; | 1074 | return 0; |
1078 | 1075 | ||
1079 | if (!pr) | 1076 | if (nocst) |
1080 | return -EINVAL; | ||
1081 | |||
1082 | if (nocst) { | ||
1083 | return -ENODEV; | 1077 | return -ENODEV; |
1084 | } | ||
1085 | 1078 | ||
1086 | if (!pr->flags.power_setup_done) | 1079 | if (!pr->flags.power_setup_done) |
1087 | return -ENODEV; | 1080 | return -ENODEV; |
@@ -1108,9 +1101,6 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr) | |||
1108 | if (disabled_by_idle_boot_param()) | 1101 | if (disabled_by_idle_boot_param()) |
1109 | return 0; | 1102 | return 0; |
1110 | 1103 | ||
1111 | if (!pr) | ||
1112 | return -EINVAL; | ||
1113 | |||
1114 | if (nocst) | 1104 | if (nocst) |
1115 | return -ENODEV; | 1105 | return -ENODEV; |
1116 | 1106 | ||
@@ -1183,9 +1173,6 @@ int acpi_processor_power_init(struct acpi_processor *pr) | |||
1183 | first_run++; | 1173 | first_run++; |
1184 | } | 1174 | } |
1185 | 1175 | ||
1186 | if (!pr) | ||
1187 | return -EINVAL; | ||
1188 | |||
1189 | if (acpi_gbl_FADT.cst_control && !nocst) { | 1176 | if (acpi_gbl_FADT.cst_control && !nocst) { |
1190 | status = | 1177 | status = |
1191 | acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8); | 1178 | acpi_os_write_port(acpi_gbl_FADT.smi_command, acpi_gbl_FADT.cst_control, 8); |