[PATCH] dfu: Make DFU virtual backend SPL friendly

Marek Vasut marex at denx.de
Sun Dec 4 19:55:27 CET 2022


On 11/30/22 11:42, Patrick Delaunay wrote:
> Define stub for dfu_*_virt function in SPL, because
> CONFIG_SPL_DFU_VIRT is not defined.
> 
> This patch avoids compilation issue in dfu_fill_entity() when
> CONFIG_SPL_DFU is activated because the dfu_fill_entity_virt()
> function is not available.
> 
> Fixes: ec44cace4b8d2 ("dfu: add DFU virtual backend")
> Reported-by: Marek Vasut <marex at denx.de>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
> See initial patch proposal:
> http://patchwork.ozlabs.org/project/uboot/patch/20221128193917.236188-1-marex@denx.de/
> 
>   include/dfu.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/dfu.h b/include/dfu.h
> index dcb9cd9d799a..07922224ef19 100644
> --- a/include/dfu.h
> +++ b/include/dfu.h
> @@ -495,7 +495,7 @@ static inline int dfu_fill_entity_mtd(struct dfu_entity *dfu, char *devstr,
>   }
>   #endif
>   
> -#ifdef CONFIG_DFU_VIRT
> +#if CONFIG_IS_ENABLED(DFU_VIRT)
>   int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr,
>   			 char **argv, int argc);
>   int dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,

Reviewed-by: Marek Vasut <marex at denx.de>
Tested-by: Marek Vasut <marex at denx.de>


More information about the U-Boot mailing list