]> git.baikalelectronics.ru Git - uboot.git/commit
fs: fat: fix wrong casting to unsigned value of sect_to_cluster()
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 4 Jun 2018 11:45:54 +0000 (20:45 +0900)
committerTom Rini <trini@konsulko.com>
Wed, 13 Jun 2018 11:49:11 +0000 (07:49 -0400)
commitce4dac3809b3c2a7d09fd34db66e2777e65e92a4
tree01303bce839ef3000f591bbd301ad4f7c41cbba0
parentc4fdfbf075abc619818b375e5c5662beb275bd74
fs: fat: fix wrong casting to unsigned value of sect_to_cluster()

After the commit 42a7feda64a7 ("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 <jh80.chung@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
include/fat.h