diff mbox series

[U-Boot,v2,07/78] core: ofnode: Fix style violations

Message ID 20171213071946.6181-7-mario.six@gdsys.cc
State Superseded, archived
Delegated to: Mario Six
Headers show
Series [U-Boot,v2,01/78] mpc8308rdb: Fix style violation | expand

Commit Message

Mario Six Dec. 13, 2017, 7:18 a.m. UTC
There are some style violations in ofnode.c; fix those.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
---

v1 -> v2:
None

---
 drivers/core/ofnode.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--
2.13.6
diff mbox series

Patch

diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 0030ab962e..ebcf64d867 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -296,7 +296,8 @@  int ofnode_parse_phandle_with_args(ofnode node, const char *list_name,
 		int ret;

 		ret = of_parse_phandle_with_args(ofnode_to_np(node),
-				list_name, cells_name, index, &args);
+						 list_name, cells_name, index,
+						 &args);
 		if (ret)
 			return ret;
 		ofnode_from_of_phandle_args(&args, out_args);
@@ -305,8 +306,9 @@  int ofnode_parse_phandle_with_args(ofnode node, const char *list_name,
 		int ret;

 		ret = fdtdec_parse_phandle_with_args(gd->fdt_blob,
-				ofnode_to_offset(node), list_name, cells_name,
-				cell_count, index, &args);
+						     ofnode_to_offset(node),
+						     list_name, cells_name,
+						     cell_count, index, &args);
 		if (ret)
 			return ret;
 		ofnode_from_fdtdec_phandle_args(&args, out_args);
@@ -534,10 +536,10 @@  int ofnode_read_pci_addr(ofnode node, enum fdt_pci_space type,
 				addr->phys_mid = fdt32_to_cpu(cell[1]);
 				addr->phys_lo = fdt32_to_cpu(cell[1]);
 				break;
-			} else {
-				cell += (FDT_PCI_ADDR_CELLS +
-					 FDT_PCI_SIZE_CELLS);
 			}
+
+			cell += (FDT_PCI_ADDR_CELLS +
+				 FDT_PCI_SIZE_CELLS);
 		}

 		if (i == num) {
@@ -546,10 +548,10 @@  int ofnode_read_pci_addr(ofnode node, enum fdt_pci_space type,
 		}

 		return 0;
-	} else {
-		ret = -EINVAL;
 	}

+	ret = -EINVAL;
+
 fail:
 	debug("(not found)\n");
 	return ret;