[PATCH] tools: gen_ethaddr_crc: Make functions static

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon Jul 7 13:37:25 CEST 2025


These functions are only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark them as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
 tools/gen_ethaddr_crc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/gen_ethaddr_crc.c b/tools/gen_ethaddr_crc.c
index e73d0429a04e..277172075809 100644
--- a/tools/gen_ethaddr_crc.c
+++ b/tools/gen_ethaddr_crc.c
@@ -16,12 +16,12 @@
 #define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) /* with separators */
 #define ARP_HLEN_LAZY (ARP_HLEN * 2) /* separatorless hardware address length */
 
-uint8_t nibble_to_hex(const char *nibble, bool lo)
+static uint8_t nibble_to_hex(const char *nibble, bool lo)
 {
 	return (strtol(nibble, NULL, 16) << (lo ? 0 : 4)) & (lo ? 0x0f : 0xf0);
 }
 
-int process_mac(const char *mac_address)
+static int process_mac(const char *mac_address)
 {
 	uint8_t ethaddr[ARP_HLEN + 1] = { 0x00 };
 	uint_fast8_t i = 0;
@@ -45,7 +45,7 @@ int process_mac(const char *mac_address)
 	return 0;
 }
 
-void print_usage(char *cmdname)
+static void print_usage(char *cmdname)
 {
 	printf("Usage: %s <mac_address>\n", cmdname);
 	puts("<mac_address> may be with or without separators.");
-- 
2.43.0



More information about the U-Boot mailing list