summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2020-08-13 13:31:52 +0800
committerSimon Horman <horms@verge.net.au>2020-08-20 17:29:53 +0200
commit01144be42d1251aceb703299ab9cdeb894c96878 (patch)
treece1c3cf2a140311d2f3ead9496d94a8a2c415418
parent24884d12d0a494b59c534af3ef067d7f7a0e075f (diff)
downloadkexec-tools-01144be42d1251aceb703299ab9cdeb894c96878.tar.gz
MIPS: Fix compile warnnings in kexec-elf-mips.c
Fix the following warnings: kexec/arch/mips/kexec-elf-mips.c:161:41: warning: passing argument 3 of ‘dtb_set_initrd’ makes integer from pointer without a cast dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size); ^ In file included from kexec/arch/mips/kexec-elf-mips.c:33:0: kexec/arch/mips/../../dt-ops.h:6:5: note: expected ‘off_t’ but argument is of type ‘char *’ int dtb_set_initrd(char **dtb, off_t *dtb_size, off_t start, off_t end); ^ kexec/arch/mips/kexec-elf-mips.c:161:53: warning: passing argument 4 of ‘dtb_set_initrd’ makes integer from pointer without a cast dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size); ^ In file included from kexec/arch/mips/kexec-elf-mips.c:33:0: kexec/arch/mips/../../dt-ops.h:6:5: note: expected ‘off_t’ but argument is of type ‘char *’ int dtb_set_initrd(char **dtb, off_t *dtb_size, off_t start, off_t end); ^ Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/mips/kexec-elf-mips.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/mips/kexec-elf-mips.c b/kexec/arch/mips/kexec-elf-mips.c
index cf908799..a2d11fc6 100644
--- a/kexec/arch/mips/kexec-elf-mips.c
+++ b/kexec/arch/mips/kexec-elf-mips.c
@@ -161,7 +161,7 @@ int elf_mips_load(int argc, char **argv, const char *buf, off_t len,
/* Create initrd entries in dtb - although at this time
* they would not point to the correct location */
- dtb_set_initrd(&dtb_buf, &dtb_length, initrd_buf, initrd_buf + initrd_size);
+ dtb_set_initrd(&dtb_buf, &dtb_length, (off_t)initrd_buf, (off_t)initrd_buf + initrd_size);
initrd_base = add_buffer(info, initrd_buf, initrd_size,
initrd_size, sizeof(void *),