[PATCH] misc: fs_loader: Fix compile warnings when CONFIG_CMD_UBIFS is enabled

Sean Anderson sean.anderson at seco.com
Fri Apr 29 22:53:22 CEST 2022



On 4/29/22 10:36 AM, Pali Rohár wrote:
> 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();
>          ^~~~~~~~~~~~~~~~
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> ---
>  drivers/misc/fs_loader.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
> index 0139bd66ba76..5b4d03639c35 100644
> --- a/drivers/misc/fs_loader.c
> +++ b/drivers/misc/fs_loader.c
> @@ -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


More information about the U-Boot mailing list