]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: cast to pointer from integer of different size
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 12 Jun 2022 11:25:22 +0000 (11:25 +0000)
committerSimon Glass <sjg@chromium.org>
Tue, 28 Jun 2022 02:09:52 +0000 (03:09 +0100)
Building sandbox_defconfig on ARMv7 with HOST_32BIT=y results in:

drivers/misc/qfw_sandbox.c:51:25: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
   51 |         void *address = (void *)be64_to_cpu(dma->address);

Add the missing type conversion.

Fixes: 69512551aa84 ("test: qemu: add qfw sandbox driver, dm tests, qemu tests")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/misc/qfw_sandbox.c

index b09974d33bd6e65d3afe37b40a535eef039634ff..1002df75339e13d6400bf2d7ba7a76f37c1c9c71 100644 (file)
@@ -48,7 +48,7 @@ static void qfw_sandbox_read_entry_dma(struct udevice *dev, struct qfw_dma *dma)
 {
        u16 entry;
        u32 control = be32_to_cpu(dma->control);
-       void *address = (void *)be64_to_cpu(dma->address);
+       void *address = (void *)(uintptr_t)be64_to_cpu(dma->address);
        u32 length = be32_to_cpu(dma->length);
        struct qfw_sandbox_plat *plat = dev_get_plat(dev);
        struct fw_cfg_file *file;