Commit 4a13e559 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpi-ipmi', 'acpi-tables' and 'acpi-apei'

Merge IMPI driver changes, ACPI tables parsing code changes and
additional APEI changes for v5.18-rc1:

 - Replace usage of found with dedicated list iterator variable
   in the ACPI IPMI driver (Jakob Koschel).

 - Make LAPIC_ADDR_OVR address readable in a message parsed during
   MADT parsing (Vasant Hegde).

 - Clean up variable name confusion in APEI (Jakob Koschel).

* acpi-ipmi:
  ACPI: IPMI: replace usage of found with dedicated list iterator variable

* acpi-tables:
  ACPI: tables: Make LAPIC_ADDR_OVR address readable in message

* acpi-apei:
  ACPI, APEI: Use the correct variable for sizeof()
...@@ -353,29 +353,27 @@ static void ipmi_flush_tx_msg(struct acpi_ipmi_device *ipmi) ...@@ -353,29 +353,27 @@ static void ipmi_flush_tx_msg(struct acpi_ipmi_device *ipmi)
static void ipmi_cancel_tx_msg(struct acpi_ipmi_device *ipmi, static void ipmi_cancel_tx_msg(struct acpi_ipmi_device *ipmi,
struct acpi_ipmi_msg *msg) struct acpi_ipmi_msg *msg)
{ {
struct acpi_ipmi_msg *tx_msg, *temp; struct acpi_ipmi_msg *tx_msg = NULL, *iter, *temp;
bool msg_found = false;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&ipmi->tx_msg_lock, flags); spin_lock_irqsave(&ipmi->tx_msg_lock, flags);
list_for_each_entry_safe(tx_msg, temp, &ipmi->tx_msg_list, head) { list_for_each_entry_safe(iter, temp, &ipmi->tx_msg_list, head) {
if (msg == tx_msg) { if (msg == iter) {
msg_found = true; tx_msg = iter;
list_del(&tx_msg->head); list_del(&iter->head);
break; break;
} }
} }
spin_unlock_irqrestore(&ipmi->tx_msg_lock, flags); spin_unlock_irqrestore(&ipmi->tx_msg_lock, flags);
if (msg_found) if (tx_msg)
acpi_ipmi_msg_put(tx_msg); acpi_ipmi_msg_put(tx_msg);
} }
static void ipmi_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data) static void ipmi_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
{ {
struct acpi_ipmi_device *ipmi_device = user_msg_data; struct acpi_ipmi_device *ipmi_device = user_msg_data;
bool msg_found = false; struct acpi_ipmi_msg *tx_msg = NULL, *iter, *temp;
struct acpi_ipmi_msg *tx_msg, *temp;
struct device *dev = ipmi_device->dev; struct device *dev = ipmi_device->dev;
unsigned long flags; unsigned long flags;
...@@ -387,16 +385,16 @@ static void ipmi_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data) ...@@ -387,16 +385,16 @@ static void ipmi_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
} }
spin_lock_irqsave(&ipmi_device->tx_msg_lock, flags); spin_lock_irqsave(&ipmi_device->tx_msg_lock, flags);
list_for_each_entry_safe(tx_msg, temp, &ipmi_device->tx_msg_list, head) { list_for_each_entry_safe(iter, temp, &ipmi_device->tx_msg_list, head) {
if (msg->msgid == tx_msg->tx_msgid) { if (msg->msgid == iter->tx_msgid) {
msg_found = true; tx_msg = iter;
list_del(&tx_msg->head); list_del(&iter->head);
break; break;
} }
} }
spin_unlock_irqrestore(&ipmi_device->tx_msg_lock, flags); spin_unlock_irqrestore(&ipmi_device->tx_msg_lock, flags);
if (!msg_found) { if (!tx_msg) {
dev_warn(dev, dev_warn(dev,
"Unexpected response (msg id %ld) is returned.\n", "Unexpected response (msg id %ld) is returned.\n",
msg->msgid); msg->msgid);
...@@ -482,15 +480,14 @@ static void ipmi_register_bmc(int iface, struct device *dev) ...@@ -482,15 +480,14 @@ static void ipmi_register_bmc(int iface, struct device *dev)
static void ipmi_bmc_gone(int iface) static void ipmi_bmc_gone(int iface)
{ {
struct acpi_ipmi_device *ipmi_device, *temp; struct acpi_ipmi_device *ipmi_device = NULL, *iter, *temp;
bool dev_found = false;
mutex_lock(&driver_data.ipmi_lock); mutex_lock(&driver_data.ipmi_lock);
list_for_each_entry_safe(ipmi_device, temp, list_for_each_entry_safe(iter, temp,
&driver_data.ipmi_devices, head) { &driver_data.ipmi_devices, head) {
if (ipmi_device->ipmi_ifnum != iface) { if (iter->ipmi_ifnum != iface) {
dev_found = true; ipmi_device = iter;
__ipmi_dev_kill(ipmi_device); __ipmi_dev_kill(iter);
break; break;
} }
} }
...@@ -500,7 +497,7 @@ static void ipmi_bmc_gone(int iface) ...@@ -500,7 +497,7 @@ static void ipmi_bmc_gone(int iface)
struct acpi_ipmi_device, head); struct acpi_ipmi_device, head);
mutex_unlock(&driver_data.ipmi_lock); mutex_unlock(&driver_data.ipmi_lock);
if (dev_found) { if (ipmi_device) {
ipmi_flush_tx_msg(ipmi_device); ipmi_flush_tx_msg(ipmi_device);
acpi_ipmi_dev_put(ipmi_device); acpi_ipmi_dev_put(ipmi_device);
} }
......
...@@ -319,7 +319,7 @@ static int apei_res_add(struct list_head *res_list, ...@@ -319,7 +319,7 @@ static int apei_res_add(struct list_head *res_list,
if (res_ins) if (res_ins)
list_add(&res_ins->list, res_list); list_add(&res_ins->list, res_list);
else { else {
res_ins = kmalloc(sizeof(*res), GFP_KERNEL); res_ins = kmalloc(sizeof(*res_ins), GFP_KERNEL);
if (!res_ins) if (!res_ins)
return -ENOMEM; return -ENOMEM;
res_ins->start = start; res_ins->start = start;
......
...@@ -151,8 +151,8 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) ...@@ -151,8 +151,8 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
{ {
struct acpi_madt_local_apic_override *p = struct acpi_madt_local_apic_override *p =
(struct acpi_madt_local_apic_override *)header; (struct acpi_madt_local_apic_override *)header;
pr_info("LAPIC_ADDR_OVR (address[%p])\n", pr_info("LAPIC_ADDR_OVR (address[0x%llx])\n",
(void *)(unsigned long)p->address); p->address);
} }
break; break;
......
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