linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: parsers: scpart: fix __udivdi3 undefined on mips
@ 2022-12-08 18:59 Mikhail Zhilkin
  2022-12-08 20:47 ` Mikhail Zhilkin
  0 siblings, 1 reply; 2+ messages in thread
From: Mikhail Zhilkin @ 2022-12-08 18:59 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Nathan Chancellor, Arnd Bergmann, ,
	Nick Desaulniers, Tom Rix, Yang Yingliang, NOGUCHI Hiroshi,
	linux-mtd, linux-kernel, llvm

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: https://github.com/ClangBuiltLinux/linux/issues/1635
Fixes: 9b78ef0c7997 ("mtd: parsers: add support for Sercomm partitions")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
---
 drivers/mtd/parsers/scpart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/parsers/scpart.c b/drivers/mtd/parsers/scpart.c
index 02601bb33de4..6e5e11c37078 100644
--- a/drivers/mtd/parsers/scpart.c
+++ b/drivers/mtd/parsers/scpart.c
@@ -50,7 +50,7 @@ static int scpart_scan_partmap(struct mtd_info
*master, loff_t partmap_offs,
 	int cnt = 0;
 	int res = 0;
 	int res2;
-	loff_t offs;
+	uint32_t offs;
 	size_t retlen;
 	struct sc_part_desc *pdesc = NULL;
 	struct sc_part_desc *tmpdesc;
-- 
2.34.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: parsers: scpart: fix __udivdi3 undefined on mips
  2022-12-08 18:59 [PATCH] mtd: parsers: scpart: fix __udivdi3 undefined on mips Mikhail Zhilkin
@ 2022-12-08 20:47 ` Mikhail Zhilkin
  0 siblings, 0 replies; 2+ messages in thread
From: Mikhail Zhilkin @ 2022-12-08 20:47 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra
  Cc: Nathan Chancellor, Arnd Bergmann, Nick Desaulniers, Tom Rix,
	Yang Yingliang, NOGUCHI Hiroshi, linux-mtd, linux-kernel, llvm

Hi guys,

I'm sorry. I noticed that the patch below is broken. For some time now I can't send patches using git-send-mail since the gmail changed the authentication process and I have to use Thunderbird. The Thunderbird broke the line in the patch.  

I've already sent the PATCH v2.

Link:
https://lore.kernel.org/linux-mtd/805fe58e-690f-6a3f-5ebf-2f6f6e6e4599@gmail.com/

Have a nice day!

-- 
Best regards,
Mikhail

On 12/8/2022 9:59 PM, Mikhail Zhilkin wrote:

> 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: https://github.com/ClangBuiltLinux/linux/issues/1635
> Fixes: 9b78ef0c7997 ("mtd: parsers: add support for Sercomm partitions")
> Reported-by: kernel test robot <lkp@intel.com>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
> ---
>  drivers/mtd/parsers/scpart.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/parsers/scpart.c b/drivers/mtd/parsers/scpart.c
> index 02601bb33de4..6e5e11c37078 100644
> --- a/drivers/mtd/parsers/scpart.c
> +++ b/drivers/mtd/parsers/scpart.c
> @@ -50,7 +50,7 @@ static int scpart_scan_partmap(struct mtd_info
> *master, loff_t partmap_offs,
>  	int cnt = 0;
>  	int res = 0;
>  	int res2;
> -	loff_t offs;
> +	uint32_t offs;
>  	size_t retlen;
>  	struct sc_part_desc *pdesc = NULL;
>  	struct sc_part_desc *tmpdesc;


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-08 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-08 18:59 [PATCH] mtd: parsers: scpart: fix __udivdi3 undefined on mips Mikhail Zhilkin
2022-12-08 20:47 ` Mikhail Zhilkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).