[PATCH] dtc: remove extra parentheses to pass clang check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Yunlian Jiang <yunlian@xxxxxxxxxxxx>

When building with clang, we get warnings like:
checks.c:623:32: error: equality comparison with extraneous parentheses
                        [-Werror,-Wparentheses-equality]
	if ((node->parent->addr_cells == -1))

URL: http://crbug.com/230457
Signed-off-by: Yunlian Jiang <yunlian@xxxxxxxxxxxx>
Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 checks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/checks.c b/checks.c
index ee96a25..e66d55c 100644
--- a/checks.c
+++ b/checks.c
@@ -624,11 +624,11 @@ static void check_avoid_default_addr_size(struct check *c, struct node *dt,
 	if (!reg && !ranges)
 		return;
 
-	if ((node->parent->addr_cells == -1))
+	if (node->parent->addr_cells == -1)
 		FAIL(c, "Relying on default #address-cells value for %s",
 		     node->fullpath);
 
-	if ((node->parent->size_cells == -1))
+	if (node->parent->size_cells == -1)
 		FAIL(c, "Relying on default #size-cells value for %s",
 		     node->fullpath);
 }
-- 
1.8.4.3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux