[PATCH v3 2/5] Add has_type_markers() helper

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



Add a marker helper function, has_type_markers(), to test if there are
already type markers present.

Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
---
v3:
 - New patch
---
 dtc.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dtc.h b/dtc.h
index 0a1f54991026..5608fdf4fe28 100644
--- a/dtc.h
+++ b/dtc.h
@@ -154,6 +154,11 @@ static inline struct marker *next_type_marker(struct marker *m)
 	return m;
 }
 
+static inline bool has_type_markers(struct marker *m)
+{
+	return next_type_marker(m) != NULL;
+}
+
 static inline size_t type_marker_length(struct marker *m)
 {
 	struct marker *next = next_type_marker(m->next);
-- 
2.27.0




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

  Powered by Linux