public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74
@ 2008-04-02  6:03 Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02  6:03 UTC (permalink / raw)
  To: u-boot

fdt.c: In function 'ft_cpu_setup':
fdt.c:33: warning: implicit declaration of function 'do_fixup_by_prop_u32'
fdt.c:39: warning: implicit declaration of function 'do_fixup_by_compat_u32'
fdt.c:43: warning: implicit declaration of function 'fdt_fixup_ethernet'
fdt.c:45: warning: implicit declaration of function 'fdt_fixup_memory'

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile
index dbdc2e0..5f70459 100644
--- a/cpu/mpc8xx/Makefile
+++ b/cpu/mpc8xx/Makefile
@@ -27,16 +27,29 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).a
 
-START	= start.o kgdb.o
-COBJS	= bedbug_860.o commproc.o cpu.o cpu_init.o	\
-	  fec.o fdt.o i2c.o interrupts.o lcd.o scc.o	\
-	  serial.o speed.o spi.o \
-	  traps.o upatch.o video.o
-SOBJS	= plprcr_write.o
-
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
-START	:= $(addprefix $(obj),$(START))
+START-y	+= start.o
+START-y	+= kgdb.o
+COBJS-y	+= bedbug_860.o
+COBJS-y	+= commproc.o
+COBJS-y	+= cpu.o
+COBJS-y	+= cpu_init.o
+COBJS-y	+= fec.o
+COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-y	+= i2c.o
+COBJS-y	+= interrupts.o
+COBJS-y	+= lcd.o
+COBJS-y	+= scc.o
+COBJS-y	+= serial.o
+COBJS-y	+= speed.o
+COBJS-y	+= spi.o
+COBJS-y	+= traps.o
+COBJS-y	+= upatch.o
+COBJS-y	+= video.o
+SOBJS-y	+= plprcr_write.o
+
+SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
+START	:= $(addprefix $(obj),$(START-y))
 
 all:	$(obj).depend $(START) $(LIB)
 
-- 
1.5.4.5

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

* [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness
  2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02  6:03 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
                     ` (2 more replies)
  2008-04-02 12:11 ` [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jerry Van Baren
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02  6:03 UTC (permalink / raw)
  To: u-boot

In function 'logbuff_init_ptrs':
cmd_log.c:79: warning: pointer targets in assignment differ in signedness

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

diff --git a/common/cmd_log.c b/common/cmd_log.c
index 34b36ff..b9f9ba0 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -76,7 +76,7 @@ void logbuff_init_ptrs (void)
 	lbuf = (char *)CONFIG_ALT_LB_ADDR;
 #else
 	log = (logbuff_t *)(gd->bd->bi_memsize-LOGBUFF_LEN) - 1;
-	lbuf = log->buf;
+	lbuf = (char *)log->buf;
 #endif
 
 	/* Set up log version */
-- 
1.5.4.5

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

* [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02  6:03   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
                       ` (3 more replies)
  2008-04-08 14:40   ` [U-Boot-Users] unassigned-patches/10: [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness u-boot at bugs.denx.de
  2008-04-18  4:14   ` [U-Boot-Users] " Wolfgang Denk
  2 siblings, 4 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02  6:03 UTC (permalink / raw)
  To: u-boot

ds174x.c: In function 'rtc_get':
ds174x.c:117: warning: no return statement in function returning non-void
ds174x.c: In function 'rtc_set':
ds174x.c:146: warning: 'return' with a value, in function returning void

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
index 81a9cb3..eb3ca88 100644
--- a/drivers/rtc/ds174x.c
+++ b/drivers/rtc/ds174x.c
@@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp )
 		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
 		tmp->tm_hour, tmp->tm_min, tmp->tm_sec );
 #endif
+	return 0;
 }
 
 void rtc_set( struct rtc_time *tmp )
@@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp )
 
 	/* unlock clock registers after read */
 	rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
-
-	return 0;
 }
 
 void rtc_reset (void)
-- 
1.5.4.5

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

* [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02 11:37     ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
                         ` (4 more replies)
  2008-04-08 14:40     ` [U-Boot-Users] unassigned-patches/12: [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function u-boot at bugs.denx.de
                       ` (2 subsequent siblings)
  3 siblings, 5 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02 11:37 UTC (permalink / raw)
  To: u-boot

cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules
cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 7b1f830..2906aed 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off)
 
 /* ------------------------------------------------------------------------- */
 
-static inline int str2long(char *p, ulong *num)
+static inline int str2long(char *p, loff_t *num)
 {
 	char *endptr;
 
@@ -93,7 +93,7 @@ static inline int str2long(char *p, ulong *num)
 }
 
 static int
-arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
+arg_off_size(int argc, char *argv[], nand_info_t *nand, loff_t *off, size_t *size)
 {
 	int idx = nand_curr_device;
 #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
@@ -136,7 +136,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
 	}
 
 	if (argc >= 2) {
-		if (!(str2long(argv[1], size))) {
+		if (!(str2long(argv[1], (loff_t*)size))) {
 			printf("'%s' is not a number\n", argv[1]);
 			return -1;
 		}
@@ -158,7 +158,9 @@ out:
 int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
 	int i, dev, ret;
-	ulong addr, off, size;
+	ulong addr;
+	loff_t off;
+	size_t size;
 	char *cmd, *s;
 	nand_info_t *nand;
 #ifdef CFG_NAND_QUIET
@@ -477,11 +479,11 @@ U_BOOT_CMD(nand, 5, 1, do_nand,
 	"nand unlock [offset] [size] - unlock section\n");
 
 static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
-			   ulong offset, ulong addr, char *cmd)
+			   loff_t offset, ulong addr, char *cmd)
 {
 	int r;
 	char *ep, *s;
-	ulong cnt;
+	size_t cnt;
 	image_header_t *hdr;
 	int jffs2 = 0;
 #if defined(CONFIG_FIT)
diff --git a/include/nand.h b/include/nand.h
index 3c0752e..b4ee14f 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -34,22 +34,22 @@ extern int nand_curr_device;
 extern nand_info_t nand_info[];
 extern void nand_init(void);
 
-static inline int nand_read(nand_info_t *info, ulong ofs, ulong *len, u_char *buf)
+static inline int nand_read(nand_info_t *info, loff_t ofs, size_t *len, u_char *buf)
 {
-	return info->read(info, ofs, *len, (size_t *)len, buf);
+	return info->read(info, ofs, *len, len, buf);
 }
 
-static inline int nand_write(nand_info_t *info, ulong ofs, ulong *len, u_char *buf)
+static inline int nand_write(nand_info_t *info, loff_t ofs, size_t *len, u_char *buf)
 {
-	return info->write(info, ofs, *len, (size_t *)len, buf);
+	return info->write(info, ofs, *len, len, buf);
 }
 
-static inline int nand_block_isbad(nand_info_t *info, ulong ofs)
+static inline int nand_block_isbad(nand_info_t *info, loff_t ofs)
 {
 	return info->block_isbad(info, ofs);
 }
 
-static inline int nand_erase(nand_info_t *info, ulong off, ulong size)
+static inline int nand_erase(nand_info_t *info, loff_t off, ulong size)
 {
 	struct erase_info instr;
 
@@ -68,8 +68,8 @@ static inline int nand_erase(nand_info_t *info, ulong off, ulong size)
 
 struct nand_write_options {
 	u_char *buffer;		/* memory block containing image to write */
-	ulong length;		/* number of bytes to write */
-	ulong offset;		/* start address in NAND */
+	size_t length;		/* number of bytes to write */
+	loff_t offset;		/* start address in NAND */
 	int quiet;		/* don't display progress messages */
 	int autoplace;		/* if true use auto oob layout */
 	int forcejffs2;		/* force jffs2 oob layout */
@@ -85,8 +85,8 @@ typedef struct nand_write_options nand_write_options_t;
 
 struct nand_read_options {
 	u_char *buffer;		/* memory block in which read image is written*/
-	ulong length;		/* number of bytes to read */
-	ulong offset;		/* start address in NAND */
+	size_t length;		/* number of bytes to read */
+	loff_t offset;		/* start address in NAND */
 	int quiet;		/* don't display progress messages */
 	int readoob;		/* put oob data in image */
 };
@@ -94,8 +94,8 @@ struct nand_read_options {
 typedef struct nand_read_options nand_read_options_t;
 
 struct nand_erase_options {
-	ulong length;		/* number of bytes to erase */
-	ulong offset;		/* first address in NAND to erase */
+	size_t length;		/* number of bytes to erase */
+	loff_t offset;		/* first address in NAND to erase */
 	int quiet;		/* don't display progress messages */
 	int jffs2;		/* if true: format for jffs2 usage
 				 * (write appropriate cleanmarker blocks) */
-- 
1.5.4.5

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

* [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb'
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02 11:41       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 17:50         ` Kim Phillips
  2008-04-08 14:40         ` [U-Boot-Users] unassigned-patches/13: " u-boot at bugs.denx.de
  2008-04-02 14:34       ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Stefan Roese
                         ` (3 subsequent siblings)
  4 siblings, 2 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02 11:41 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 83fb60d..965bb67 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -16,10 +16,10 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
+#include <fdt_support.h>
 #include <spd_sdram.h>
 #include <vsc7385.h>
 
-
 #if defined(CFG_DRAM_TEST)
 int
 testdram(void)
-- 
1.5.4.5

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

* [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74
  2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02 12:11 ` Jerry Van Baren
  2008-04-08 14:40 ` [U-Boot-Users] unassigned-patches/9: " u-boot at bugs.denx.de
  2008-04-08 20:47 ` [U-Boot-Users] [U-boot] " Wolfgang Denk
  3 siblings, 0 replies; 23+ messages in thread
From: Jerry Van Baren @ 2008-04-02 12:11 UTC (permalink / raw)
  To: u-boot

Jean-Christophe PLAGNIOL-VILLARD wrote:
> fdt.c: In function 'ft_cpu_setup':
> fdt.c:33: warning: implicit declaration of function 'do_fixup_by_prop_u32'
> fdt.c:39: warning: implicit declaration of function 'do_fixup_by_compat_u32'
> fdt.c:43: warning: implicit declaration of function 'fdt_fixup_ethernet'
> fdt.c:45: warning: implicit declaration of function 'fdt_fixup_memory'
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile
> index dbdc2e0..5f70459 100644
> --- a/cpu/mpc8xx/Makefile
> +++ b/cpu/mpc8xx/Makefile
> @@ -27,16 +27,29 @@ include $(TOPDIR)/config.mk
>  
>  LIB	= $(obj)lib$(CPU).a
>  
> -START	= start.o kgdb.o
> -COBJS	= bedbug_860.o commproc.o cpu.o cpu_init.o	\
> -	  fec.o fdt.o i2c.o interrupts.o lcd.o scc.o	\
> -	  serial.o speed.o spi.o \
> -	  traps.o upatch.o video.o
> -SOBJS	= plprcr_write.o
> -
> -SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
> -OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
> -START	:= $(addprefix $(obj),$(START))
> +START-y	+= start.o
> +START-y	+= kgdb.o
> +COBJS-y	+= bedbug_860.o
> +COBJS-y	+= commproc.o
> +COBJS-y	+= cpu.o
> +COBJS-y	+= cpu_init.o
> +COBJS-y	+= fec.o
> +COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
> +COBJS-y	+= i2c.o
> +COBJS-y	+= interrupts.o
> +COBJS-y	+= lcd.o
> +COBJS-y	+= scc.o
> +COBJS-y	+= serial.o
> +COBJS-y	+= speed.o
> +COBJS-y	+= spi.o
> +COBJS-y	+= traps.o
> +COBJS-y	+= upatch.o
> +COBJS-y	+= video.o
> +SOBJS-y	+= plprcr_write.o
> +
> +SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
> +OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
> +START	:= $(addprefix $(obj),$(START-y))
>  
>  all:	$(obj).depend $(START) $(LIB)

I did this too, but did not do as good a job (I did not change SOBJS to 
SOBJS-y and START to START-y).  Reference for my version:
   <http://article.gmane.org/gmane.comp.boot-loaders.u-boot/38885/>

I've replaced my version with J-C's version in u-boot-fdt.

Acked-by: Gerald Van Baren <vanbaren@cideas.com>

P.S. Thanks, Jean-Christophe, for doing a bunch of warning clean up.

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

* [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02 14:34       ` Stefan Roese
  2008-04-02 14:39       ` Wolfgang Denk
                         ` (2 subsequent siblings)
  4 siblings, 0 replies; 23+ messages in thread
From: Stefan Roese @ 2008-04-02 14:34 UTC (permalink / raw)
  To: u-boot

On Wednesday 02 April 2008, Jean-Christophe PLAGNIOL-VILLARD wrote:
> cmd_nand.c:353: warning: dereferencing type-punned pointer will break
> strict-aliasing rules cmd_nand.c:356: warning: dereferencing type-punned
> pointer will break strict-aliasing rules
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

NAK.

Patch doesn't work. After applying I get the following messages on Kilauea:

=> nand write 100000 0 100000

NAND write: device 0 offset 0x0, size 0x0
 0 bytes written: OK
=> nand read 200000 0 100000

NAND read: device 0 offset 0x0, size 0x0
 0 bytes read: OK

So nothing is read/written at all. This is how it behaves without this patch:

=> nand write 100000 0 100000

NAND write: device 0 offset 0x0, size 0x100000
 1048576 bytes written: OK
=> nand read 200000 0 100000

NAND read: device 0 offset 0x0, size 0x100000
 1048576 bytes read: OK


Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

* [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 14:34       ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Stefan Roese
@ 2008-04-02 14:39       ` Wolfgang Denk
  2008-04-02 14:50         ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-08 14:40       ` [U-Boot-Users] unassigned-patches/11: " u-boot at bugs.denx.de
  2008-04-08 20:49       ` [U-Boot-Users] [U-boot] " Wolfgang Denk
  4 siblings, 1 reply; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-02 14:39 UTC (permalink / raw)
  To: u-boot

In message <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules
> cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> index 7b1f830..2906aed 100644
> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off)
>  
>  /* ------------------------------------------------------------------------- */
>  
> -static inline int str2long(char *p, ulong *num)
> +static inline int str2long(char *p, loff_t *num)

I think this is plain wrong. It may silence the warning, but it is
wrong.

The type is the result of calling simple_strtoul(), and this function
returns, um, and unsigned long. And not an offset type.

> -arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
> +arg_off_size(int argc, char *argv[], nand_info_t *nand, loff_t *off, size_t *size)

No. That's all wrong.


NAK.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.

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

* [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02 14:39       ` Wolfgang Denk
@ 2008-04-02 14:50         ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-02 14:50 UTC (permalink / raw)
  To: u-boot

On 16:39 Wed 02 Apr     , Wolfgang Denk wrote:
> In message <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules
> > cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > 
> > diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> > index 7b1f830..2906aed 100644
> > --- a/common/cmd_nand.c
> > +++ b/common/cmd_nand.c
> > @@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off)
> >  
> >  /* ------------------------------------------------------------------------- */
> >  
> > -static inline int str2long(char *p, ulong *num)
> > +static inline int str2long(char *p, loff_t *num)
> 
> I think this is plain wrong. It may silence the warning, but it is
> wrong.
> 
> The type is the result of calling simple_strtoul(), and this function
> returns, um, and unsigned long. And not an offset type.
I agree
> 
> > -arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
> > +arg_off_size(int argc, char *argv[], nand_info_t *nand, loff_t *off, size_t *size)
> 
> No. That's all wrong.
I disagree, the true type of the offest is loff_t and size is size_t in
the linux/mtd.

Maybe we need to do the cast to ulong in this function.

Best Regards,
J.

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

* [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb'
  2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-02 17:50         ` Kim Phillips
  2008-04-08 14:40         ` [U-Boot-Users] unassigned-patches/13: " u-boot at bugs.denx.de
  1 sibling, 0 replies; 23+ messages in thread
From: Kim Phillips @ 2008-04-02 17:50 UTC (permalink / raw)
  To: u-boot

On Wed,  2 Apr 2008 13:41:21 +0200
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:

> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
Acked-by: Kim Phillips <kim.phillips@freescale.com>

Kim

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

* [U-Boot-Users] unassigned-patches/9: [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74
  2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 12:11 ` [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jerry Van Baren
@ 2008-04-08 14:40 ` u-boot at bugs.denx.de
  2008-04-08 20:47 ` [U-Boot-Users] [U-boot] " Wolfgang Denk
  3 siblings, 0 replies; 23+ messages in thread
From: u-boot at bugs.denx.de @ 2008-04-08 14:40 UTC (permalink / raw)
  To: u-boot

fdt.c: In function 'ft_cpu_setup':
fdt.c:33: warning: implicit declaration of function 'do_fixup_by_prop_u32'
fdt.c:39: warning: implicit declaration of function 'do_fixup_by_compat_u32'
fdt.c:43: warning: implicit declaration of function 'fdt_fixup_ethernet'
fdt.c:45: warning: implicit declaration of function 'fdt_fixup_memory'

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Added to GNATS database as unassigned-patches/9
>Responsible:    patch-coord
>Message-Id:     <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com>
>In-Reply-To:    
>References:     
>Patch-Date:     Wed Apr 02 08:03:56 +0200 2008
diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile
index dbdc2e0..5f70459 100644
--- a/cpu/mpc8xx/Makefile
+++ b/cpu/mpc8xx/Makefile
@@ -27,16 +27,29 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(CPU).a
 
-START	= start.o kgdb.o
-COBJS	= bedbug_860.o commproc.o cpu.o cpu_init.o	\
-	  fec.o fdt.o i2c.o interrupts.o lcd.o scc.o	\
-	  serial.o speed.o spi.o \
-	  traps.o upatch.o video.o
-SOBJS	= plprcr_write.o
-
-SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
-START	:= $(addprefix $(obj),$(START))
+START-y	+= start.o
+START-y	+= kgdb.o
+COBJS-y	+= bedbug_860.o
+COBJS-y	+= commproc.o
+COBJS-y	+= cpu.o
+COBJS-y	+= cpu_init.o
+COBJS-y	+= fec.o
+COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-y	+= i2c.o
+COBJS-y	+= interrupts.o
+COBJS-y	+= lcd.o
+COBJS-y	+= scc.o
+COBJS-y	+= serial.o
+COBJS-y	+= speed.o
+COBJS-y	+= spi.o
+COBJS-y	+= traps.o
+COBJS-y	+= upatch.o
+COBJS-y	+= video.o
+SOBJS-y	+= plprcr_write.o
+
+SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
+START	:= $(addprefix $(obj),$(START-y))
 
 all:	$(obj).depend $(START) $(LIB)
 
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] unassigned-patches/12: [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-08 14:40     ` u-boot at bugs.denx.de
  2008-04-08 21:01     ` [U-Boot-Users] [U-boot] " Wolfgang Denk
  2008-04-18  4:14     ` [U-Boot-Users] " Wolfgang Denk
  3 siblings, 0 replies; 23+ messages in thread
From: u-boot at bugs.denx.de @ 2008-04-08 14:40 UTC (permalink / raw)
  To: u-boot

ds174x.c: In function 'rtc_get':
ds174x.c:117: warning: no return statement in function returning non-void
ds174x.c: In function 'rtc_set':
ds174x.c:146: warning: 'return' with a value, in function returning void

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Added to GNATS database as unassigned-patches/12
>Responsible:    patch-coord
>Message-Id:     <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com>
>In-Reply-To:    <1207116238-7253-2-git-send-email-plagnioj@jcrosoft.com>
>References:     <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com>	<1207116238-7253-2-git-send-email-plagnioj@jcrosoft.com>
>Patch-Date:     Wed Apr 02 08:03:58 +0200 2008
diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
index 81a9cb3..eb3ca88 100644
--- a/drivers/rtc/ds174x.c
+++ b/drivers/rtc/ds174x.c
@@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp )
 		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
 		tmp->tm_hour, tmp->tm_min, tmp->tm_sec );
 #endif
+	return 0;
 }
 
 void rtc_set( struct rtc_time *tmp )
@@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp )
 
 	/* unlock clock registers after read */
 	rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
-
-	return 0;
 }
 
 void rtc_reset (void)
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] unassigned-patches/11: [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
                         ` (2 preceding siblings ...)
  2008-04-02 14:39       ` Wolfgang Denk
@ 2008-04-08 14:40       ` u-boot at bugs.denx.de
  2008-04-08 20:49       ` [U-Boot-Users] [U-boot] " Wolfgang Denk
  4 siblings, 0 replies; 23+ messages in thread
From: u-boot at bugs.denx.de @ 2008-04-08 14:40 UTC (permalink / raw)
  To: u-boot

cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules
cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Added to GNATS database as unassigned-patches/11
>Responsible:    patch-coord
>Message-Id:     <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com>
>In-Reply-To:    <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com>
>References:     <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com>
>Patch-Date:     Wed Apr 02 13:37:50 +0200 2008
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 7b1f830..2906aed 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off)
 
 /* ------------------------------------------------------------------------- */
 
-static inline int str2long(char *p, ulong *num)
+static inline int str2long(char *p, loff_t *num)
 {
 	char *endptr;
 
@@ -93,7 +93,7 @@ static inline int str2long(char *p, ulong *num)
 }
 
 static int
-arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
+arg_off_size(int argc, char *argv[], nand_info_t *nand, loff_t *off, size_t *size)
 {
 	int idx = nand_curr_device;
 #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
@@ -136,7 +136,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
 	}
 
 	if (argc >= 2) {
-		if (!(str2long(argv[1], size))) {
+		if (!(str2long(argv[1], (loff_t*)size))) {
 			printf("'%s' is not a number\n", argv[1]);
 			return -1;
 		}
@@ -158,7 +158,9 @@ out:
 int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
 	int i, dev, ret;
-	ulong addr, off, size;
+	ulong addr;
+	loff_t off;
+	size_t size;
 	char *cmd, *s;
 	nand_info_t *nand;
 #ifdef CFG_NAND_QUIET
@@ -477,11 +479,11 @@ U_BOOT_CMD(nand, 5, 1, do_nand,
 	"nand unlock [offset] [size] - unlock section\n");
 
 static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
-			   ulong offset, ulong addr, char *cmd)
+			   loff_t offset, ulong addr, char *cmd)
 {
 	int r;
 	char *ep, *s;
-	ulong cnt;
+	size_t cnt;
 	image_header_t *hdr;
 	int jffs2 = 0;
 #if defined(CONFIG_FIT)
diff --git a/include/nand.h b/include/nand.h
index 3c0752e..b4ee14f 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -34,22 +34,22 @@ extern int nand_curr_device;
 extern nand_info_t nand_info[];
 extern void nand_init(void);
 
-static inline int nand_read(nand_info_t *info, ulong ofs, ulong *len, u_char *buf)
+static inline int nand_read(nand_info_t *info, loff_t ofs, size_t *len, u_char *buf)
 {
-	return info->read(info, ofs, *len, (size_t *)len, buf);
+	return info->read(info, ofs, *len, len, buf);
 }
 
-static inline int nand_write(nand_info_t *info, ulong ofs, ulong *len, u_char *buf)
+static inline int nand_write(nand_info_t *info, loff_t ofs, size_t *len, u_char *buf)
 {
-	return info->write(info, ofs, *len, (size_t *)len, buf);
+	return info->write(info, ofs, *len, len, buf);
 }
 
-static inline int nand_block_isbad(nand_info_t *info, ulong ofs)
+static inline int nand_block_isbad(nand_info_t *info, loff_t ofs)
 {
 	return info->block_isbad(info, ofs);
 }
 
-static inline int nand_erase(nand_info_t *info, ulong off, ulong size)
+static inline int nand_erase(nand_info_t *info, loff_t off, ulong size)
 {
 	struct erase_info instr;
 
@@ -68,8 +68,8 @@ static inline int nand_erase(nand_info_t *info, ulong off, ulong size)
 
 struct nand_write_options {
 	u_char *buffer;		/* memory block containing image to write */
-	ulong length;		/* number of bytes to write */
-	ulong offset;		/* start address in NAND */
+	size_t length;		/* number of bytes to write */
+	loff_t offset;		/* start address in NAND */
 	int quiet;		/* don't display progress messages */
 	int autoplace;		/* if true use auto oob layout */
 	int forcejffs2;		/* force jffs2 oob layout */
@@ -85,8 +85,8 @@ typedef struct nand_write_options nand_write_options_t;
 
 struct nand_read_options {
 	u_char *buffer;		/* memory block in which read image is written*/
-	ulong length;		/* number of bytes to read */
-	ulong offset;		/* start address in NAND */
+	size_t length;		/* number of bytes to read */
+	loff_t offset;		/* start address in NAND */
 	int quiet;		/* don't display progress messages */
 	int readoob;		/* put oob data in image */
 };
@@ -94,8 +94,8 @@ struct nand_read_options {
 typedef struct nand_read_options nand_read_options_t;
 
 struct nand_erase_options {
-	ulong length;		/* number of bytes to erase */
-	ulong offset;		/* first address in NAND to erase */
+	size_t length;		/* number of bytes to erase */
+	loff_t offset;		/* first address in NAND to erase */
 	int quiet;		/* don't display progress messages */
 	int jffs2;		/* if true: format for jffs2 usage
 				 * (write appropriate cleanmarker blocks) */
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] unassigned-patches/10: [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-08 14:40   ` u-boot at bugs.denx.de
  2008-04-18  4:14   ` [U-Boot-Users] " Wolfgang Denk
  2 siblings, 0 replies; 23+ messages in thread
From: u-boot at bugs.denx.de @ 2008-04-08 14:40 UTC (permalink / raw)
  To: u-boot

In function 'logbuff_init_ptrs':
cmd_log.c:79: warning: pointer targets in assignment differ in signedness

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Added to GNATS database as unassigned-patches/10
>Responsible:    patch-coord
>Message-Id:     <1207116238-7253-2-git-send-email-plagnioj@jcrosoft.com>
>In-Reply-To:    <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com>
>References:     <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com>
>Patch-Date:     Wed Apr 02 08:03:57 +0200 2008
diff --git a/common/cmd_log.c b/common/cmd_log.c
index 34b36ff..b9f9ba0 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -76,7 +76,7 @@ void logbuff_init_ptrs (void)
 	lbuf = (char *)CONFIG_ALT_LB_ADDR;
 #else
 	log = (logbuff_t *)(gd->bd->bi_memsize-LOGBUFF_LEN) - 1;
-	lbuf = log->buf;
+	lbuf = (char *)log->buf;
 #endif
 
 	/* Set up log version */
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] unassigned-patches/13: [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb'
  2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 17:50         ` Kim Phillips
@ 2008-04-08 14:40         ` u-boot at bugs.denx.de
  1 sibling, 0 replies; 23+ messages in thread
From: u-boot at bugs.denx.de @ 2008-04-08 14:40 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Added to GNATS database as unassigned-patches/13
>Responsible:    patch-coord
>Message-Id:     <1207136481-19429-1-git-send-email-plagnioj@jcrosoft.com>
>In-Reply-To:    <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com>
>References:     <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com>
>Patch-Date:     Wed Apr 02 13:41:21 +0200 2008
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 83fb60d..965bb67 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -16,10 +16,10 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
+#include <fdt_support.h>
 #include <spd_sdram.h>
 #include <vsc7385.h>
 
-
 #if defined(CFG_DRAM_TEST)
 int
 testdram(void)
-- 
1.5.4.5


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

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

* [U-Boot-Users] [U-boot] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74
  2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
                   ` (2 preceding siblings ...)
  2008-04-08 14:40 ` [U-Boot-Users] unassigned-patches/9: " u-boot at bugs.denx.de
@ 2008-04-08 20:47 ` Wolfgang Denk
  2008-04-09  0:04   ` Jerry Van Baren
  3 siblings, 1 reply; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-08 20:47 UTC (permalink / raw)
  To: u-boot

In message <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> fdt.c: In function 'ft_cpu_setup':
> fdt.c:33: warning: implicit declaration of function 'do_fixup_by_prop_u32'
> fdt.c:39: warning: implicit declaration of function 'do_fixup_by_compat_u32'
> fdt.c:43: warning: implicit declaration of function 'fdt_fixup_ethernet'
> fdt.c:45: warning: implicit declaration of function 'fdt_fixup_memory'
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile
> index dbdc2e0..5f70459 100644
> --- a/cpu/mpc8xx/Makefile
> +++ b/cpu/mpc8xx/Makefile
> @@ -27,16 +27,29 @@ include $(TOPDIR)/config.mk
>  
>  LIB	= $(obj)lib$(CPU).a
>  
> -START	= start.o kgdb.o
> -COBJS	= bedbug_860.o commproc.o cpu.o cpu_init.o	\
> -	  fec.o fdt.o i2c.o interrupts.o lcd.o scc.o	\
> -	  serial.o speed.o spi.o \
> -	  traps.o upatch.o video.o
> -SOBJS	= plprcr_write.o
> -
> -SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
> -OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
> -START	:= $(addprefix $(obj),$(START))
> +START-y	+= start.o
> +START-y	+= kgdb.o
> +COBJS-y	+= bedbug_860.o
> +COBJS-y	+= commproc.o
> +COBJS-y	+= cpu.o
> +COBJS-y	+= cpu_init.o
> +COBJS-y	+= fec.o
> +COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
> +COBJS-y	+= i2c.o
> +COBJS-y	+= interrupts.o
> +COBJS-y	+= lcd.o
> +COBJS-y	+= scc.o
> +COBJS-y	+= serial.o
> +COBJS-y	+= speed.o
> +COBJS-y	+= spi.o
> +COBJS-y	+= traps.o
> +COBJS-y	+= upatch.o
> +COBJS-y	+= video.o
> +SOBJS-y	+= plprcr_write.o
> +
> +SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
> +OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
> +START	:= $(addprefix $(obj),$(START-y))
>  
>  all:	$(obj).depend $(START) $(LIB)

I cannot see any correlation between your commit message and the
actual changes???


NAK.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Plan to throw one away.  You will anyway."
                              - Fred Brooks, "The Mythical Man Month"

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

* [U-Boot-Users] [U-boot] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
                         ` (3 preceding siblings ...)
  2008-04-08 14:40       ` [U-Boot-Users] unassigned-patches/11: " u-boot at bugs.denx.de
@ 2008-04-08 20:49       ` Wolfgang Denk
  4 siblings, 0 replies; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-08 20:49 UTC (permalink / raw)
  To: u-boot

In message <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
> cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules
> cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> index 7b1f830..2906aed 100644
> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off)
>  
>  /* ------------------------------------------------------------------------- */
>  
> -static inline int str2long(char *p, ulong *num)
> +static inline int str2long(char *p, loff_t *num)

We discussed this before.

string-to-long converts into a "long" type, not into an offset type.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Above all else -- sky.

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

* [U-Boot-Users] [U-boot] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
  2008-04-08 14:40     ` [U-Boot-Users] unassigned-patches/12: [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function u-boot at bugs.denx.de
@ 2008-04-08 21:01     ` Wolfgang Denk
  2008-04-09  8:46       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-18  4:14     ` [U-Boot-Users] " Wolfgang Denk
  3 siblings, 1 reply; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-08 21:01 UTC (permalink / raw)
  To: u-boot

In message <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> ds174x.c: In function 'rtc_get':
> ds174x.c:117: warning: no return statement in function returning non-void
> ds174x.c: In function 'rtc_set':
> ds174x.c:146: warning: 'return' with a value, in function returning void
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
> index 81a9cb3..eb3ca88 100644
> --- a/drivers/rtc/ds174x.c
> +++ b/drivers/rtc/ds174x.c
> @@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp )
>  		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
>  		tmp->tm_hour, tmp->tm_min, tmp->tm_sec );
>  #endif
> +	return 0;
>  }
>  
>  void rtc_set( struct rtc_time *tmp )
> @@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp )
>  
>  	/* unlock clock registers after read */
>  	rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
> -
> -	return 0;
>  }
>  
>  void rtc_reset (void)

I think this is actually not the right fix.

To make things right, both rtc_set() and rtc_get() should return
"int".

Yes, I'm aware that this is far beyond the scope of your fixes here,
but I wanted to at least note that.

Note that this is no NAK.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The word "fit", as I understand it, means "appropriate to a purpose",
and I would say the body of the Dean is supremely appropriate to  the
purpose of sitting around all day and eating big heavy meals.
                                 - Terry Pratchett, _Moving Pictures_

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

* [U-Boot-Users] [U-boot] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74
  2008-04-08 20:47 ` [U-Boot-Users] [U-boot] " Wolfgang Denk
@ 2008-04-09  0:04   ` Jerry Van Baren
  0 siblings, 0 replies; 23+ messages in thread
From: Jerry Van Baren @ 2008-04-09  0:04 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> In message <1207116238-7253-1-git-send-email-plagnioj@jcrosoft.com> you wrote:
>> fdt.c: In function 'ft_cpu_setup':
>> fdt.c:33: warning: implicit declaration of function 'do_fixup_by_prop_u32'
>> fdt.c:39: warning: implicit declaration of function 'do_fixup_by_compat_u32'
>> fdt.c:43: warning: implicit declaration of function 'fdt_fixup_ethernet'
>> fdt.c:45: warning: implicit declaration of function 'fdt_fixup_memory'
>>
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>>
>> diff --git a/cpu/mpc8xx/Makefile b/cpu/mpc8xx/Makefile
>> index dbdc2e0..5f70459 100644
>> --- a/cpu/mpc8xx/Makefile
>> +++ b/cpu/mpc8xx/Makefile
>> @@ -27,16 +27,29 @@ include $(TOPDIR)/config.mk
>>  
>>  LIB	= $(obj)lib$(CPU).a
>>  
>> -START	= start.o kgdb.o
>> -COBJS	= bedbug_860.o commproc.o cpu.o cpu_init.o	\
>> -	  fec.o fdt.o i2c.o interrupts.o lcd.o scc.o	\
>> -	  serial.o speed.o spi.o \
>> -	  traps.o upatch.o video.o
>> -SOBJS	= plprcr_write.o
>> -
>> -SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
>> -OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
>> -START	:= $(addprefix $(obj),$(START))
>> +START-y	+= start.o
>> +START-y	+= kgdb.o
>> +COBJS-y	+= bedbug_860.o
>> +COBJS-y	+= commproc.o
>> +COBJS-y	+= cpu.o
>> +COBJS-y	+= cpu_init.o
>> +COBJS-y	+= fec.o
>> +COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
>> +COBJS-y	+= i2c.o
>> +COBJS-y	+= interrupts.o
>> +COBJS-y	+= lcd.o
>> +COBJS-y	+= scc.o
>> +COBJS-y	+= serial.o
>> +COBJS-y	+= speed.o
>> +COBJS-y	+= spi.o
>> +COBJS-y	+= traps.o
>> +COBJS-y	+= upatch.o
>> +COBJS-y	+= video.o
>> +SOBJS-y	+= plprcr_write.o
>> +
>> +SRCS	:= $(START-y:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
>> +OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
>> +START	:= $(addprefix $(obj),$(START-y))
>>  
>>  all:	$(obj).depend $(START) $(LIB)
> 
> I cannot see any correlation between your commit message and the
> actual changes???
> 
> 
> NAK.
> 
> Best regards,
> 
> Wolfgang Denk

Actually, I've already slipped this one in through the u-boot-fdt 
repository (I took the liberty since it was a problem with fdt.o and 
CONFIG_OF_LIBFDT).

<http://article.gmane.org/gmane.comp.boot-loaders.u-boot/39261/>

The problem is that only a couple of 8xx boards are using libfdt, but 
they were *all* compiling fdt.c.  The result for the boards that did not 
have CONFIG_OF_LIBFDT was the compilation warnings on the (erroneously 
compiled) fdt.c.

I had fixed it independently, but Jean-Christophe's fix was better (more 
complete), so I dropped my patch and picked up his.

Best regards,
gvb

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

* [U-Boot-Users] [U-boot] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-08 21:01     ` [U-Boot-Users] [U-boot] " Wolfgang Denk
@ 2008-04-09  8:46       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-04-09 10:42         ` Wolfgang Denk
  0 siblings, 1 reply; 23+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-04-09  8:46 UTC (permalink / raw)
  To: u-boot

On 23:01 Tue 08 Apr     , Wolfgang Denk wrote:
> In message <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> > ds174x.c: In function 'rtc_get':
> > ds174x.c:117: warning: no return statement in function returning non-void
> > ds174x.c: In function 'rtc_set':
> > ds174x.c:146: warning: 'return' with a value, in function returning void
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > 
> > diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
> > index 81a9cb3..eb3ca88 100644
> > --- a/drivers/rtc/ds174x.c
> > +++ b/drivers/rtc/ds174x.c
> > @@ -114,6 +114,7 @@ int rtc_get( struct rtc_time *tmp )
> >  		tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
> >  		tmp->tm_hour, tmp->tm_min, tmp->tm_sec );
> >  #endif
> > +	return 0;
> >  }
> >  
> >  void rtc_set( struct rtc_time *tmp )
> > @@ -142,8 +143,6 @@ void rtc_set( struct rtc_time *tmp )
> >  
> >  	/* unlock clock registers after read */
> >  	rtc_write( RTC_CONTROLA, ( reg_a  & ~RTC_CA_WRITE ));
> > -
> > -	return 0;
> >  }
> >  
> >  void rtc_reset (void)
> 
> I think this is actually not the right fix.
> 
> To make things right, both rtc_set() and rtc_get() should return
> "int".
> 
> Yes, I'm aware that this is far beyond the scope of your fixes here,
> but I wanted to at least note that.
> 
> Note that this is no NAK.
> 
I can add it in my task for this fix window or in the next merge windows

Best Regards,
J.

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

* [U-Boot-Users] [U-boot] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-09  8:46       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-04-09 10:42         ` Wolfgang Denk
  0 siblings, 0 replies; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-09 10:42 UTC (permalink / raw)
  To: u-boot

In message <20080409084635.GB28294@game.jcrosoft.org> you wrote:
>
> > To make things right, both rtc_set() and rtc_get() should return
> > "int".
> > 
> > Yes, I'm aware that this is far beyond the scope of your fixes here,
> > but I wanted to at least note that.
> > 
> > Note that this is no NAK.
> > 
> I can add it in my task for this fix window or in the next merge windows

That would be great - next window, please. Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Testing can show the presense of bugs, but not their absence.
                                                   -- Edsger Dijkstra

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

* [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness
  2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
  2008-04-08 14:40   ` [U-Boot-Users] unassigned-patches/10: [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness u-boot at bugs.denx.de
@ 2008-04-18  4:14   ` Wolfgang Denk
  2 siblings, 0 replies; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-18  4:14 UTC (permalink / raw)
  To: u-boot

In message <1207116238-7253-2-git-send-email-plagnioj@jcrosoft.com> you wrote:
> In function 'logbuff_init_ptrs':
> cmd_log.c:79: warning: pointer targets in assignment differ in signedness
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> diff --git a/common/cmd_log.c b/common/cmd_log.c
> index 34b36ff..b9f9ba0 100644
> --- a/common/cmd_log.c
> +++ b/common/cmd_log.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Contrary to popular belief, thinking does not cause brain damage.

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

* [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function
  2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
                       ` (2 preceding siblings ...)
  2008-04-08 21:01     ` [U-Boot-Users] [U-boot] " Wolfgang Denk
@ 2008-04-18  4:14     ` Wolfgang Denk
  3 siblings, 0 replies; 23+ messages in thread
From: Wolfgang Denk @ 2008-04-18  4:14 UTC (permalink / raw)
  To: u-boot

In message <1207116238-7253-3-git-send-email-plagnioj@jcrosoft.com> you wrote:
> ds174x.c: In function 'rtc_get':
> ds174x.c:117: warning: no return statement in function returning non-void
> ds174x.c: In function 'rtc_set':
> ds174x.c:146: warning: 'return' with a value, in function returning void
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anything free is worth what you pay for it.

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

end of thread, other threads:[~2008-04-18  4:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02  6:03 [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jean-Christophe PLAGNIOL-VILLARD
2008-04-02  6:03 ` [U-Boot-Users] [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness Jean-Christophe PLAGNIOL-VILLARD
2008-04-02  6:03   ` [U-Boot-Users] [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 11:37     ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 11:41       ` [U-Boot-Users] [PATCH] mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb' Jean-Christophe PLAGNIOL-VILLARD
2008-04-02 17:50         ` Kim Phillips
2008-04-08 14:40         ` [U-Boot-Users] unassigned-patches/13: " u-boot at bugs.denx.de
2008-04-02 14:34       ` [U-Boot-Users] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules Stefan Roese
2008-04-02 14:39       ` Wolfgang Denk
2008-04-02 14:50         ` Jean-Christophe PLAGNIOL-VILLARD
2008-04-08 14:40       ` [U-Boot-Users] unassigned-patches/11: " u-boot at bugs.denx.de
2008-04-08 20:49       ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-08 14:40     ` [U-Boot-Users] unassigned-patches/12: [PATCH 2/2] ds174x: Fix warning on return in rtc_get and rtc_set function u-boot at bugs.denx.de
2008-04-08 21:01     ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-09  8:46       ` Jean-Christophe PLAGNIOL-VILLARD
2008-04-09 10:42         ` Wolfgang Denk
2008-04-18  4:14     ` [U-Boot-Users] " Wolfgang Denk
2008-04-08 14:40   ` [U-Boot-Users] unassigned-patches/10: [PATCH 1/2] cmd_log.c: Fix assignment differ in signedness u-boot at bugs.denx.de
2008-04-18  4:14   ` [U-Boot-Users] " Wolfgang Denk
2008-04-02 12:11 ` [U-Boot-Users] [PATCH 0/2] MPC8xx: Fix libfdt support introduced in commit 77ff7b74 Jerry Van Baren
2008-04-08 14:40 ` [U-Boot-Users] unassigned-patches/9: " u-boot at bugs.denx.de
2008-04-08 20:47 ` [U-Boot-Users] [U-boot] " Wolfgang Denk
2008-04-09  0:04   ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox