summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/compiler.h1
-rw-r--r--include/device.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/compiler.h b/include/compiler.h
index ab6e28ea..35bf1652 100644
--- a/include/compiler.h
+++ b/include/compiler.h
@@ -30,6 +30,7 @@
#define __noreturn __attribute__((noreturn))
/* not __const as this has a different meaning (const) */
#define __attrconst __attribute__((const))
+#define __warn_unused_result __attribute__((warn_unused_result))
#if 0 /* Provided by gcc stddef.h */
#define offsetof(type,m) __builtin_offsetof(type,m)
diff --git a/include/device.h b/include/device.h
index 65ceef45..16c26bb0 100644
--- a/include/device.h
+++ b/include/device.h
@@ -18,6 +18,7 @@
#define __DEVICE_H
#include <ccan/list/list.h>
#include <ccan/short_types/short_types.h>
+#include <compiler.h>
/* Any property or node with this prefix will not be passed to the kernel. */
#define DT_PRIVATE "skiboot,"
@@ -187,7 +188,7 @@ void dt_free(struct dt_node *node);
/* Parse an initial fdt */
void dt_expand(const void *fdt);
-int dt_expand_node(struct dt_node *node, const void *fdt, int fdt_node);
+int dt_expand_node(struct dt_node *node, const void *fdt, int fdt_node) __warn_unused_result;
/* Simplified accessors */
u64 dt_prop_get_u64(const struct dt_node *node, const char *prop);
OpenPOWER on IntegriCloud