mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
Subject: [OSS-Tools] [PATCH 2/5] libdt: fix issues of external function without prototype
Date: Wed, 31 May 2023 17:10:12 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

When increasing warning level, we see that of_find_device_by_node_path
lacks a prototype despite having external linkage and being exported
in the symbols file. On the other hand, scan_proc_dir has external
linkage, but is only ever needed internally, so let's give it internal

Signed-off-by: Ahmad Fatoum <>
 src/crc32.c | 1 +
 src/dt/dt.h | 1 +
 src/libdt.c | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/crc32.c b/src/crc32.c
index 8d4dddcf6129..8273d3465f6f 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -8,6 +8,7 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
+#include <dt/common.h>
 #include <stdint.h>
 /* ========================================================================
diff --git a/src/dt/dt.h b/src/dt/dt.h
index 4ae24ba8bf7a..6ce95d91da87 100644
--- a/src/dt/dt.h
+++ b/src/dt/dt.h
@@ -121,6 +121,7 @@ extern struct device_node *of_find_node_by_type(struct device_node *from,
 	const char *type);
 extern struct device_node *of_find_compatible_node(struct device_node *from,
 	const char *type, const char *compat);
+extern struct udev_device *of_find_device_by_node_path(const char *of_full_path);
 extern const struct of_device_id *of_match_node(
 	const struct of_device_id *matches, const struct device_node *node);
 extern struct device_node *of_find_matching_node_and_match(
diff --git a/src/libdt.c b/src/libdt.c
index 59e76d336d8d..a833c582dfbf 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -1938,7 +1938,7 @@ int of_device_disable_path(const char *path)
 	return of_device_disable(node);
-int scan_proc_dir(struct device_node *node, const char *path)
+static int scan_proc_dir(struct device_node *node, const char *path)
 	DIR *dir;
 	struct dirent *dirent;

  reply	other threads:[~2023-05-31 15:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 15:10 [OSS-Tools] [PATCH 1/5] configure: pass -fno-strict-aliasing to GCC Ahmad Fatoum
2023-05-31 15:10 ` Ahmad Fatoum [this message]
2023-05-31 15:10 ` [OSS-Tools] [PATCH 3/5] libdt: use memcpy instead of strncpy Ahmad Fatoum
2023-05-31 15:10 ` [OSS-Tools] [PATCH 4/5] libdt: don't use old-style function definition Ahmad Fatoum
2023-05-31 15:10 ` [OSS-Tools] [PATCH 5/5] barebox-state: fix use after free in error path Ahmad Fatoum
2023-06-02 12:45   ` Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox