Hi Seung-Woo,
> After the commit 265edc03d5a1 ("fs/fat: Clean up open-coded sector
> <-> cluster conversions"), it is hung up writing new file to FAT16
> disk with more than 19 files in armv7. It is because result value
> of sect_to_cluster() is not proper by casting from signed value to
> unsigned value. Fix the wrong casting of sect_to_cluster().
>
> Reported-by: Jaehoon Chung <[email protected]>
> Signed-off-by: Seung-Woo Kim <[email protected]>
> ---
> include/fat.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/fat.h b/include/fat.h
> index 7dada41..09e1423 100644
> --- a/include/fat.h
> +++ b/include/fat.h
> @@ -180,7 +180,7 @@ static inline u32 clust_to_sect(fsdata *fsdata,
> u32 clust) return fsdata->data_begin + clust * fsdata->clust_size;
> }
>
> -static inline u32 sect_to_clust(fsdata *fsdata, u32 sect)
> +static inline u32 sect_to_clust(fsdata *fsdata, int sect)
> {
> return (sect - fsdata->data_begin) / fsdata->clust_size;
> }Reviewed-by: Lukasz Majewski <[email protected]> Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
pgpl4pLjMC06B.pgp
Description: OpenPGP digital signature
_______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

