From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 31 May 2023 17:10:23 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q4NSy-004Ouw-Tm for lore@lore.pengutronix.de; Wed, 31 May 2023 17:10:23 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1q4NSv-0003Nm-4c; Wed, 31 May 2023 17:10:21 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4NSs-0003Lh-Kr; Wed, 31 May 2023 17:10:18 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q4NSs-00495H-0p; Wed, 31 May 2023 17:10:18 +0200 Received: from afa by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1q4NSr-005tJn-0g; Wed, 31 May 2023 17:10:17 +0200 From: Ahmad Fatoum To: oss-tools@pengutronix.de Date: Wed, 31 May 2023 17:10:12 +0200 Message-Id: <20230531151015.1404262-2-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531151015.1404262-1-a.fatoum@pengutronix.de> References: <20230531151015.1404262-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [OSS-Tools] [PATCH 2/5] libdt: fix issues of external function without prototype X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 linkage. 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
#include /* ======================================================================== 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; -- 2.39.2