aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/tmem.c8
-rw-r--r--drivers/xen/xen-acpi-cpuhotplug.c12
-rw-r--r--drivers/xen/xen-scsiback.c5
3 files changed, 5 insertions, 20 deletions
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c
index fb31d64c2608..239738f944ba 100644
--- a/drivers/xen/tmem.c
+++ b/drivers/xen/tmem.c
@@ -381,15 +381,9 @@ static int __init xen_tmem_init(void)
381#ifdef CONFIG_FRONTSWAP 381#ifdef CONFIG_FRONTSWAP
382 if (tmem_enabled && frontswap) { 382 if (tmem_enabled && frontswap) {
383 char *s = ""; 383 char *s = "";
384 struct frontswap_ops *old_ops;
385 384
386 tmem_frontswap_poolid = -1; 385 tmem_frontswap_poolid = -1;
387 old_ops = frontswap_register_ops(&tmem_frontswap_ops); 386 frontswap_register_ops(&tmem_frontswap_ops);
388 if (IS_ERR(old_ops) || old_ops) {
389 if (IS_ERR(old_ops))
390 return PTR_ERR(old_ops);
391 s = " (WARNING: frontswap_ops overridden)";
392 }
393 pr_info("frontswap enabled, RAM provided by Xen Transcendent Memory%s\n", 387 pr_info("frontswap enabled, RAM provided by Xen Transcendent Memory%s\n",
394 s); 388 s);
395 } 389 }
diff --git a/drivers/xen/xen-acpi-cpuhotplug.c b/drivers/xen/xen-acpi-cpuhotplug.c
index 3e62ee4b3b66..f4a369429553 100644
--- a/drivers/xen/xen-acpi-cpuhotplug.c
+++ b/drivers/xen/xen-acpi-cpuhotplug.c
@@ -46,13 +46,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
46 unsigned long long value; 46 unsigned long long value;
47 union acpi_object object = { 0 }; 47 union acpi_object object = { 0 };
48 struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; 48 struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
49 struct acpi_processor *pr; 49 struct acpi_processor *pr = acpi_driver_data(device);
50
51 pr = acpi_driver_data(device);
52 if (!pr) {
53 pr_err(PREFIX "Cannot find driver data\n");
54 return -EINVAL;
55 }
56 50
57 if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) { 51 if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) {
58 /* Declared with "Processor" statement; match ProcessorID */ 52 /* Declared with "Processor" statement; match ProcessorID */
@@ -77,7 +71,7 @@ static int xen_acpi_processor_enable(struct acpi_device *device)
77 71
78 pr->id = xen_pcpu_id(pr->acpi_id); 72 pr->id = xen_pcpu_id(pr->acpi_id);
79 73
80 if ((int)pr->id < 0) 74 if (invalid_logical_cpuid(pr->id))
81 /* This cpu is not presented at hypervisor, try to hotadd it */ 75 /* This cpu is not presented at hypervisor, try to hotadd it */
82 if (ACPI_FAILURE(xen_acpi_cpu_hotadd(pr))) { 76 if (ACPI_FAILURE(xen_acpi_cpu_hotadd(pr))) {
83 pr_err(PREFIX "Hotadd CPU (acpi_id = %d) failed.\n", 77 pr_err(PREFIX "Hotadd CPU (acpi_id = %d) failed.\n",
@@ -226,7 +220,7 @@ static acpi_status xen_acpi_cpu_hotadd(struct acpi_processor *pr)
226 return AE_ERROR; 220 return AE_ERROR;
227 221
228 pr->id = xen_hotadd_cpu(pr); 222 pr->id = xen_hotadd_cpu(pr);
229 if ((int)pr->id < 0) 223 if (invalid_logical_cpuid(pr->id))
230 return AE_ERROR; 224 return AE_ERROR;
231 225
232 /* 226 /*
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index b7f51504f85a..39223c3e99ad 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -49,10 +49,7 @@
49 49
50#include <generated/utsrelease.h> 50#include <generated/utsrelease.h>
51 51
52#include <scsi/scsi.h> 52#include <scsi/scsi_host.h> /* SG_ALL */
53#include <scsi/scsi_dbg.h>
54#include <scsi/scsi_eh.h>
55#include <scsi/scsi_tcq.h>
56 53
57#include <target/target_core_base.h> 54#include <target/target_core_base.h>
58#include <target/target_core_fabric.h> 55#include <target/target_core_fabric.h>