summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorHanjun Guo <hanjun.guo@linaro.org>2015-05-11 07:17:14 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-05-14 00:28:15 +0300
commit16eac059a6800f640423b7b6e2e9fc7091bad102 (patch)
tree4aa2f2fd21f4fa42c988085227c5cc6e2138ec67 /drivers/xen
parent25956b6612601cf36022392ffa83f6bf97939bcd (diff)
downloadlinux-16eac059a6800f640423b7b6e2e9fc7091bad102.tar.xz
Xen / ACPI / processor: use invalid_logical_cpuid()
Use invalid_logical_cpuid(pr->id) instead of direct comparison. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/xen-acpi-cpuhotplug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/xen-acpi-cpuhotplug.c b/drivers/xen/xen-acpi-cpuhotplug.c
index 3e62ee4b3b66..5a62aa007d4a 100644
--- a/drivers/xen/xen-acpi-cpuhotplug.c
+++ b/drivers/xen/xen-acpi-cpuhotplug.c
@@ -77,7 +77,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
pr->id = xen_pcpu_id(pr->acpi_id);
- if ((int)pr->id < 0)
+ if (invalid_logical_cpuid(pr->id))
/* This cpu is not presented at hypervisor, try to hotadd it */
if (ACPI_FAILURE(xen_acpi_cpu_hotadd(pr))) {
pr_err(PREFIX "Hotadd CPU (acpi_id = %d) failed.\n",
@@ -226,7 +226,7 @@ static acpi_status xen_acpi_cpu_hotadd(struct acpi_processor *pr)
return AE_ERROR;
pr->id = xen_hotadd_cpu(pr);
- if ((int)pr->id < 0)
+ if (invalid_logical_cpuid(pr->id))
return AE_ERROR;
/*