All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix compile warnnings in kexec-elf-mips.c
@ 2020-08-13  5:31 Youling Tang
  2020-08-20 15:31 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Youling Tang @ 2020-08-13  5:31 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

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>
---
 kexec/arch/mips/kexec-elf-mips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/mips/kexec-elf-mips.c b/kexec/arch/mips/kexec-elf-mips.c
index cf90879..a2d11fc 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 *),
-- 
2.1.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] MIPS: Fix compile warnnings in kexec-elf-mips.c
  2020-08-13  5:31 [PATCH] MIPS: Fix compile warnnings in kexec-elf-mips.c Youling Tang
@ 2020-08-20 15:31 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2020-08-20 15:31 UTC (permalink / raw)
  To: Youling Tang; +Cc: kexec

On Thu, Aug 13, 2020 at 01:31:52PM +0800, Youling Tang wrote:
> 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>

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2020-08-20 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13  5:31 [PATCH] MIPS: Fix compile warnnings in kexec-elf-mips.c Youling Tang
2020-08-20 15:31 ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.