Skip to contentSkip to conversation

misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabled

PATCH In review Pali Rohár 3 participants 3 messages Apr 29, 2022 – May 5, 2022 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabled

drivers/misc/fs_loader.c: In function ‘mount_ubifs’:
drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration]

  int ret = ubi_part(mtdpart, NULL);
            ^~~~~~~~
drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_mount(ubivol);
         ^~~~~~~~~~~~~~~
drivers/misc/fs_loader.c: In function ‘umount_ubifs’:
drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_umount();
         ^~~~~~~~~~~~~~~~
---
 drivers/misc/fs_loader.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/misc/fs_loader.c +4 -0
index 0139bd66ba76..5b4d03639c35 100644
@@ -20,6 +20,10 @@
 #include <malloc.h>
 #include <spl.h>
 
+#ifdef CONFIG_CMD_UBIFS
+#include <ubi_uboot.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /**
Signature · 1 line
2.20.1
#1 lore raw
Quoted 23 lines · Pali Rohár

drivers/misc/fs_loader.c: In function ‘mount_ubifs’:
drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration]

  int ret = ubi_part(mtdpart, NULL);
            ^~~~~~~~
drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_mount(ubivol);
         ^~~~~~~~~~~~~~~
drivers/misc/fs_loader.c: In function ‘umount_ubifs’:
drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_umount();
         ^~~~~~~~~~~~~~~~
---
 drivers/misc/fs_loader.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/misc/fs_loader.c +0 -0
index 0139bd66ba76..5b4d03639c35 100644

drivers/misc/fs_loader.c line 29

Quoted 10 lines
drivers/misc/fs_loader.c +4 -0
@@ -20,6 +20,10 @@
 #include <malloc.h>
 #include <spl.h>
 
+#ifdef CONFIG_CMD_UBIFS
+#include <ubi_uboot.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 /**

Can we include this unconditionally?

--Sean

#2 lore raw
In reply to Pali Rohár
Quoted 12 lines · Pali Rohár

drivers/misc/fs_loader.c: In function ‘mount_ubifs’:
drivers/misc/fs_loader.c:46:12: warning: implicit declaration of function ‘ubi_part’ [-Wimplicit-function-declaration]

  int ret = ubi_part(mtdpart, NULL);
            ^~~~~~~~
drivers/misc/fs_loader.c:53:9: warning: implicit declaration of function ‘cmd_ubifs_mount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_mount(ubivol);
         ^~~~~~~~~~~~~~~
drivers/misc/fs_loader.c: In function ‘umount_ubifs’:
drivers/misc/fs_loader.c:58:9: warning: implicit declaration of function ‘cmd_ubifs_umount’ [-Wimplicit-function-declaration]
  return cmd_ubifs_umount();
         ^~~~~~~~~~~~~~~~
Quoted 1 line

Applied to u-boot/master, thanks!

Signature · 1 line
Tom