public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	kexec@lists.infradead.org
Subject: Re: [PATCH 3/7] powerpc32: pull in libfdt
Date: Thu, 1 Apr 2010 09:58:19 +1100	[thread overview]
Message-ID: <20100331225819.GC10909@verge.net.au> (raw)
In-Reply-To: <1270023858-26947-4-git-send-email-sebastian@breakpoint.cc>

On Wed, Mar 31, 2010 at 10:24:14AM +0200, Sebastian Andrzej Siewior wrote:
> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> 
> This is v1.2.0 of libfdt from the dtc project which is available at
>  git://www.jdl.com/software/dtc.git
> 
> The other files
> - include/page.h
> - include/types.h
> - libfdt-wrapper.c
> - ops.h
> 
> are part of the glue code which is used the powerpc boot wrapper code
> is comming from the Linux kernel v2.6.27-rc6 and has been modified a
> little to fit.

Hi,

I'm seeing some signed vs unsigned comparison warnings in this code.
Here is a stab that I took at fixing them. Do they seem reasonable to you?
If so, we could either merge them into your patch or just apply them
as another patch.

Index: kexec-tools/kexec/arch/ppc/libfdt/fdt.c
===================================================================
--- kexec-tools.orig/kexec/arch/ppc/libfdt/fdt.c	2010-04-01 09:15:34.000000000 +1100
+++ kexec-tools/kexec/arch/ppc/libfdt/fdt.c	2010-04-01 09:28:56.000000000 +1100
@@ -74,7 +74,7 @@ int fdt_check_header(const void *fdt)
 	return 0;
 }
 
-const void *fdt_offset_ptr(const void *fdt, int offset, int len)
+const void *fdt_offset_ptr(const void *fdt, unsigned offset, unsigned len)
 {
 	const char *p;
 
@@ -189,7 +189,7 @@ const char *_fdt_find_string(const char
 	return NULL;
 }
 
-int fdt_move(const void *fdt, void *buf, int bufsize)
+int fdt_move(const void *fdt, void *buf, unsigned bufsize)
 {
 	FDT_CHECK_HEADER(fdt);
 
Index: kexec-tools/kexec/arch/ppc/libfdt/libfdt.h
===================================================================
--- kexec-tools.orig/kexec/arch/ppc/libfdt/libfdt.h	2010-04-01 09:29:38.000000000 +1100
+++ kexec-tools/kexec/arch/ppc/libfdt/libfdt.h	2010-04-01 09:34:31.000000000 +1100
@@ -122,7 +122,7 @@
 /* Low-level functions (you probably don't need these)                */
 /**********************************************************************/
 
-const void *fdt_offset_ptr(const void *fdt, int offset, int checklen);
+const void *fdt_offset_ptr(const void *fdt, unsigned offset, unsigned checklen);
 static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
 {
 	return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen);
@@ -206,7 +206,7 @@ int fdt_check_header(const void *fdt);
  *     -FDT_ERR_BADVERSION,
  *     -FDT_ERR_BADSTATE, standard meanings
  */
-int fdt_move(const void *fdt, void *buf, int bufsize);
+int fdt_move(const void *fdt, void *buf, unsigned bufsize);
 
 /**********************************************************************/
 /* Read-only functions                                                */
@@ -781,7 +781,7 @@ int fdt_nop_node(void *fdt, int nodeoffs
 /* Sequential write functions                                         */
 /**********************************************************************/
 
-int fdt_create(void *buf, int bufsize);
+int fdt_create(void *buf, unsigned bufsize);
 int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
 int fdt_finish_reservemap(void *fdt);
 int fdt_begin_node(void *fdt, const char *name);
@@ -1071,6 +1071,6 @@ int fdt_del_node(void *fdt, int nodeoffs
 /* Debugging / informational functions                                */
 /**********************************************************************/
 
-const char *fdt_strerror(int errval);
+const char *fdt_strerror(unsigned errval);
 
 #endif /* _LIBFDT_H */

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

  reply	other threads:[~2010-03-31 22:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  8:24 PPC32 kexec v3 Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 1/7] slurpfile: use lseek() on character nodes instead of fstat() for file size Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 2/7] powerpc: dtb and purgatory support for ppc32 Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 3/7] powerpc32: pull in libfdt Sebastian Andrzej Siewior
2010-03-31 22:58   ` Simon Horman [this message]
2010-04-01  7:05     ` Sebastian Andrzej Siewior
2010-04-06  6:12       ` Simon Horman
2010-04-06  7:51         ` Sebastian Andrzej Siewior
2010-04-06  8:41           ` Simon Horman
2010-04-06  9:47             ` Sebastian Andrzej Siewior
2010-04-06 23:40               ` Simon Horman
2010-04-21 14:13                 ` Sebastian Andrzej Siewior
2010-05-21 23:20                   ` Simon Horman
2010-03-31  8:24 ` [PATCH 4/7] powerpc32: add support to fixup the dtb Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 5/7] powerpc32: add support for uImage Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 6/7] Split Powerpc's uImage code Sebastian Andrzej Siewior
2010-03-31  8:24 ` [PATCH 7/7] Let SH adn ARM use common uImage probe code Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100331225819.GC10909@verge.net.au \
    --to=horms@verge.net.au \
    --cc=bigeasy@linutronix.de \
    --cc=kexec@lists.infradead.org \
    --cc=sebastian@breakpoint.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox