Skip to content

Commit 105c14b

Browse files
csharper2005miquelraynal
authored andcommitted
mtd: parsers: scpart: fix __udivdi3 undefined on mips
This fixes the following compile error on mips architecture with clang version 16.0.0 reported by the 0-DAY CI Kernel Test Service: ld.lld: error: undefined symbol: __udivdi3 referenced by scpart.c mtd/parsers/scpart.o:(scpart_parse) in archive drivers/built-in.a As a workaround this makes 'offs' a 32-bit type. This is enough, because the mtd containing partition table practically does not exceed 1 MB. We can revert this when the [Link] has been resolved. Link: ClangBuiltLinux#1635 Fixes: 9b78ef0 ("mtd: parsers: add support for Sercomm partitions") Reported-by: kernel test robot <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Mikhail Zhilkin <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 7adde5a commit 105c14b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mtd/parsers/scpart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int scpart_scan_partmap(struct mtd_info *master, loff_t partmap_offs,
5050
int cnt = 0;
5151
int res = 0;
5252
int res2;
53-
loff_t offs;
53+
uint32_t offs;
5454
size_t retlen;
5555
struct sc_part_desc *pdesc = NULL;
5656
struct sc_part_desc *tmpdesc;

0 commit comments

Comments
 (0)