Skip to contentSkip to conversation

minor cleanups for IORT patch set

PATCH New Hanjun Guo 1 participant 3 messages Sep 14, 2016

Subsystems (4)
lore
Share & tools
lore

Hanjun Guo

author maintainer
#0 lore raw

cover minor cleanups for IORT patch set

From: Hanjun Guo <[email protected]>

Minor cleanup for IORT patches and no functional change, based on Marc's irq/irqchip-4.9 branch

Hanjun Guo (2):
ACPI: IORT: minor cleanup for iort_match_node_callback()
irqchip: gic-v3-its: keep the head file include in alphabetic order

 drivers/acpi/arm64/iort.c        | 10 +++-------
 drivers/irqchip/irq-gic-v3-its.c |  3 +--
 2 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.12.4
author maintainer
#1 lore raw

PATCH 1/2 ACPI: IORT: minor cleanup for iort_match_node_callback()

From: Hanjun Guo <[email protected]>

Cleanup iort_match_node_callback() a little bit to reduce some lines of code, aslo fix the indentation in iort_scan_node().

---
 drivers/acpi/arm64/iort.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/acpi/arm64/iort.c +3 -7
index 6b81746..2032005 100644
@@ -132,7 +132,7 @@ static struct acpi_iort_node *iort_scan_node(enum acpi_iort_node_type type,
 
 		if (iort_node->type == type &&
 		    ACPI_SUCCESS(callback(iort_node, context)))
-				return iort_node;
+			return iort_node;
 
 		iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node,
 					 iort_node->length);
@@ -145,17 +145,15 @@ static acpi_status iort_match_node_callback(struct acpi_iort_node *node,
 					    void *context)
 {
 	struct device *dev = context;
-	acpi_status status;
+	acpi_status status = AE_NOT_FOUND;
 
 	if (node->type == ACPI_IORT_NODE_NAMED_COMPONENT) {
 		struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL };
 		struct acpi_device *adev = to_acpi_device_node(dev->fwnode);
 		struct acpi_iort_named_component *ncomp;
 
-		if (!adev) {
-			status = AE_NOT_FOUND;
+		if (!adev)
 			goto out;
-		}
 
 		status = acpi_get_name(adev->handle, ACPI_FULL_PATHNAME, &buf);
 		if (ACPI_FAILURE(status)) {
@@ -181,8 +179,6 @@ static acpi_status iort_match_node_callback(struct acpi_iort_node *node,
 		 */
 		status = pci_rc->pci_segment_number == pci_domain_nr(bus) ?
 							AE_OK : AE_NOT_FOUND;
-	} else {
-		status = AE_NOT_FOUND;
 	}
 out:
 	return status;
Signature · 1 line
1.7.12.4
author maintainer
#2 lore raw

PATCH 2/2 irqchip: gic-v3-its: keep the head file include in alphabetic order

In reply to Hanjun Guo

From: Hanjun Guo <[email protected]>

The head file is strictly in alphabetic order now, so let's not be the rule breaker.

And acpi_iort.h includes acpi.h, remove acpi.h here.

---
 drivers/irqchip/irq-gic-v3-its.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-gic-v3-its.c +1 -2
index 35c851c..b1ff440 100644
@@ -15,13 +15,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/acpi.h>
+#include <linux/acpi_iort.h>
 #include <linux/bitmap.h>
 #include <linux/cpu.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/irqdomain.h>
-#include <linux/acpi_iort.h>
 #include <linux/log2.h>
 #include <linux/mm.h>
 #include <linux/msi.h>
Signature · 1 line
1.7.12.4