[PATCH] mtd: mtdpart: Change size type from fdt_addr_t to fdt_size_t

Tom Rini trini at konsulko.com
Tue Jun 7 18:46:33 CEST 2022


On Fri, May 13, 2022 at 10:24:51PM +0200, Pali Rohár wrote:

> Set correct type for 3rd argument of ofnode_get_addr_size_index_notrans()
> function. It expects fdt_size_t * and not fdt_addr_t *.
> 
> When these two types do not have same size then U-Boot throw compile
> warning:
> 
>     drivers/mtd/mtdpart.c: In function ‘add_mtd_partitions_of’:
>     drivers/mtd/mtdpart.c:906:57: warning: passing argument 3 of ‘ofnode_get_addr_size_index_notrans’ from incompatible pointer type [-Wincompatible-pointer-types]
>        offset = ofnode_get_addr_size_index_notrans(child, 0, &size);
>                                                              ^~~~~
>     In file included from include/dm/device.h:13,
>                      from include/linux/mtd/mtd.h:26,
>                      from include/ubi_uboot.h:28,
>                      from drivers/mtd/mtdpart.c:27:
>     include/dm/ofnode.h:530:25: note: expected ‘fdt_size_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘fdt_addr_t *’ {aka ‘long unsigned int *’}
>                  fdt_size_t *size);
>                  ~~~~~~~~~~~~^~~~
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220607/43de85bc/attachment.sig>


More information about the U-Boot mailing list