[PATCH 05/13] fs/cramfs: use schedule instead of cyclic_run as callback

Stefan Roese sr at denx.de
Tue Oct 22 13:11:57 CEST 2024


On 10/3/24 23:27, Rasmus Villemoes wrote:
> Prior to commit 29caf9305b6f ("cyclic: Use schedule() instead of
> WATCHDOG_RESET()") we had
> 
> /* Currently only needed for fs/cramfs/uncompress.c */
> static inline void watchdog_reset_func(void)
> {
>         WATCHDOG_RESET();
> }
> 
> and .outcb was set to that watchdog_reset_func().  Said commit changed
> that .outcb to cyclic_run instead of schedule, which would otherwise
> match all the other WATCHDOG_RESET replacements done. As the
> HW_WATCHDOG case is not handled by cyclic_run, this seems to be an
> oversight.
> 
> Signed-off-by: Rasmus Villemoes <ravi at prevas.dk>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   fs/cramfs/uncompress.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
> index 2141edf22e4..97af8cb2b4f 100644
> --- a/fs/cramfs/uncompress.c
> +++ b/fs/cramfs/uncompress.c
> @@ -21,9 +21,9 @@
>    */
>   
>   #include <stdio.h>
> -#include <cyclic.h>
>   #include <malloc.h>
>   #include <watchdog.h>
> +#include <u-boot/schedule.h>
>   #include <u-boot/zlib.h>
>   
>   static z_stream stream;
> @@ -63,7 +63,7 @@ int cramfs_uncompress_init (void)
>   	stream.avail_in = 0;
>   
>   #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
> -	stream.outcb = (cb_func)cyclic_run;
> +	stream.outcb = (cb_func)schedule;
>   #else
>   	stream.outcb = Z_NULL;
>   #endif /* CONFIG_HW_WATCHDOG */

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list