Skip to contentSkip to conversation

dmar: coding style cleanup for dmar_parse_one_rhsa()

PATCH New Suresh Siddha 1 participant 2 messages Oct 7, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmar: coding style cleanup for dmar_parse_one_rhsa()

---
 drivers/pci/dmar.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/dmar.c +3 -2
Index: iommu-2.6/drivers/pci/dmar.c
===================================================================
@@ -362,8 +362,9 @@ dmar_parse_one_rhsa(struct acpi_dmar_hea
 			if (!node_online(node))
 				node = -1;
 			drhd->iommu->node = node;
-		return 0;
-	}
+
+			return 0;
+		}
 
 	return -ENODEV;
 }
#1 lore raw

PATCH 2/2 acpi: define acpi_map_pxm_to_node() for !CONFIG_NUMA

Alexander Beregalov reported:
drivers/pci/dmar.c: In function 'dmar_parse_one_rhsa':
drivers/pci/dmar.c:360: error: implicit declaration of function 'acpi_map_pxm_to_node'

---
 include/acpi/acpi_numa.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/acpi/acpi_numa.h +7 -0
Index: iommu-2.6/include/acpi/acpi_numa.h
===================================================================
@@ -16,5 +16,12 @@ extern int node_to_pxm(int);
 extern void __acpi_map_pxm_to_node(int, int);
 extern int acpi_map_pxm_to_node(int);
 
+#else				/* !CONFIG_ACPI_NUMA */
+
+static inline int acpi_map_pxm_to_node(int pxm)
+{
+	return -1;
+}
+
 #endif				/* CONFIG_ACPI_NUMA */
 #endif				/* __ACP_NUMA_H */