Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451369

[PATCH v2 3/5] x86/ioapic: Fix setup_res() failing to get resource

From Rui Wang <rui.y.wang@intel.com>
Newsgroups linux.kernel
Subject [PATCH v2 3/5] x86/ioapic: Fix setup_res() failing to get resource
Date 2016-07-27 18:10 +0200
Message-ID <rZzzb-1Cb-13@gated-at.bofh.it> (permalink)
References <rZhsC-6N1-25@gated-at.bofh.it> <rZzzb-1Cb-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


setup_res() doesn't actually get any resource because it mistakenly
checks the return value of acpi_dev_filter_resource_type(), which
returns 0 on success, and 1 on failure. Fix it by taking the return
value of non-zero as failing to match the specified resource type.

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
---
 drivers/acpi/ioapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c
index 2449377..8ab6d42 100644
--- a/drivers/acpi/ioapic.c
+++ b/drivers/acpi/ioapic.c
@@ -46,7 +46,7 @@ static acpi_status setup_res(struct acpi_resource *acpi_res, void *data)
 	struct resource_win win;
 
 	res->flags = 0;
-	if (acpi_dev_filter_resource_type(acpi_res, IORESOURCE_MEM) == 0)
+	if (acpi_dev_filter_resource_type(acpi_res, IORESOURCE_MEM))
 		return AE_OK;
 
 	if (!acpi_dev_resource_memory(acpi_res, res)) {
-- 
1.8.3.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-07-26 18:30 +0200
  Re: [PATCH 1/4] x86/ioapic: Support hot-removal of IOAPICs present  during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-07-26 22:20 +0200
    Re: [PATCH 1/4] x86/ioapic: Support hot-removal of IOAPICs present  during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-07-26 22:50 +0200
      [PATCH v2 2/5] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
        Re: [PATCH v2 2/5] x86/ioapic: Support hot-removal of IOAPICs  present during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-07-27 19:20 +0200
      [PATCH v2 3/5] x86/ioapic: Fix setup_res() failing to get resource Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
      [PATCH v2 0/5] Fixing a set of bugs for ioapic hotplug Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
        [PATCH v2 5/5] x86/ioapic: Fix ioapic failing to request resource Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
        [PATCH v2 4/5] x86/ioapic: Fix lost IOAPIC resource after hot-removal and hotadd Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
        [PATCH v2 1/5] x86/ioapic: Change prototype of acpi_ioapic_add() Rui Wang <rui.y.wang@intel.com> - 2016-07-27 18:10 +0200
    Re: [PATCH 1/4] x86/ioapic: Support hot-removal of IOAPICs present during boot boot Rui Wang <rui.y.wang@intel.com> - 2016-07-27 04:40 +0200

csiph-web