fs: exfat: Inhibit unused exfat_humanize_bytes() and exfat_print_info()
authorMarek Vasut <marex@denx.de>
Wed, 30 Apr 2025 16:45:52 +0000 (18:45 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 5 May 2025 20:19:20 +0000 (14:19 -0600)
Make sure unused exfat_humanize_bytes() and exfat_print_info()
functions are not compiled into U-Boot code base. This also removes
CID 550300:  Integer handling issues  (INTEGER_OVERFLOW)
in exfat_humanize_bytes() , which is now surely unreachable.

Signed-off-by: Marek Vasut <marex@denx.de>
fs/exfat/exfat.h
fs/exfat/utils.c

index cce3e30..ca6f22b 100644 (file)
@@ -210,9 +210,11 @@ uint32_t exfat_vbr_start_checksum(const void* sector, size_t size);
 uint32_t exfat_vbr_add_checksum(const void* sector, size_t size, uint32_t sum);
 le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name,
                size_t length);
+#ifndef __UBOOT__
 void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb);
 void exfat_print_info(const struct exfat_super_block* sb,
                uint32_t free_clusters);
+#endif
 bool exfat_match_option(const char* options, const char* option_name);
 
 int exfat_utf16_to_utf8(char* output, const le16_t* input, size_t outsize,
index 0d97b65..f99dcba 100644 (file)
@@ -134,6 +134,7 @@ le16_t exfat_calc_name_hash(const struct exfat* ef, const le16_t* name,
        return cpu_to_le16(hash);
 }
 
+#ifndef __UBOOT__
 void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb)
 {
        size_t i;
@@ -178,6 +179,7 @@ void exfat_print_info(const struct exfat_super_block* sb,
        exfat_humanize_bytes(avail_space, &hb);
        printf("Available space      %10"PRIu64" %s\n", hb.value, hb.unit);
 }
+#endif
 
 bool exfat_match_option(const char* options, const char* option_name)
 {