LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 3/6] h8300 setup.c initrd support fix
@ 2008-02-16  6:13 Yoshinori Sato
  2008-02-16  6:22 ` Yoshinori Sato
  2008-02-16  6:29 ` Andrew Morton
  0 siblings, 2 replies; 7+ messages in thread
From: Yoshinori Sato @ 2008-02-16  6:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

initrd setting fix.

 arch/h8300/kernel/setup.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index b1f25c2..75712ec 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
 extern int _ramstart, _ramend;
 extern char _target_name[];
 extern void h8300_gpio_init(void);
+extern void *initrd_start, *initrd_end;
 
 #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
     && defined(CONFIG_GDB_MAGICPRINT)
@@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
 	/* allow for ROMFS on the end of the kernel */
 	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
 #if defined(CONFIG_BLK_DEV_INITRD)
-		initrd_start = memory_start;
-		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
+		initrd_start = (void *)memory_start;
+		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
 #else
 		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
 #endif
-- 
1.5.4.1

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-16  6:13 [PATCH 3/6] h8300 setup.c initrd support fix Yoshinori Sato
@ 2008-02-16  6:22 ` Yoshinori Sato
  2008-02-16  6:29 ` Andrew Morton
  1 sibling, 0 replies; 7+ messages in thread
From: Yoshinori Sato @ 2008-02-16  6:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

At Sat, 16 Feb 2008 01:13:37 -0500,
Yoshinori Sato wrote:
> 
> initrd setting fix.
> 
>  arch/h8300/kernel/setup.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index b1f25c2..75712ec 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
>  extern int _ramstart, _ramend;
>  extern char _target_name[];
>  extern void h8300_gpio_init(void);
> +extern void *initrd_start, *initrd_end;
>  
>  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
>      && defined(CONFIG_GDB_MAGICPRINT)
> @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
>  	/* allow for ROMFS on the end of the kernel */
>  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
>  #if defined(CONFIG_BLK_DEV_INITRD)
> -		initrd_start = memory_start;
> -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> +		initrd_start = (void *)memory_start;
> +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
>  #else
>  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
>  #endif
> -- 
> 1.5.4.1
> 
> -- 
> Yoshinori Sato
> <ysato@users.sourceforge.jp>

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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-16  6:13 [PATCH 3/6] h8300 setup.c initrd support fix Yoshinori Sato
  2008-02-16  6:22 ` Yoshinori Sato
@ 2008-02-16  6:29 ` Andrew Morton
  2008-02-17  4:39   ` Yoshinori Sato
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-02-16  6:29 UTC (permalink / raw)
  To: Yoshinori Sato; +Cc: lkml

On Sat, 16 Feb 2008 01:13:37 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:

> initrd setting fix.
> 
>  arch/h8300/kernel/setup.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index b1f25c2..75712ec 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
>  extern int _ramstart, _ramend;
>  extern char _target_name[];
>  extern void h8300_gpio_init(void);
> +extern void *initrd_start, *initrd_end;
>  
>  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
>      && defined(CONFIG_GDB_MAGICPRINT)
> @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
>  	/* allow for ROMFS on the end of the kernel */
>  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
>  #if defined(CONFIG_BLK_DEV_INITRD)
> -		initrd_start = memory_start;
> -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> +		initrd_start = (void *)memory_start;
> +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
>  #else
>  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
>  #endif

But include/linux/initrd.h declares:

	extern unsigned long initrd_start, initrd_end;


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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-16  6:29 ` Andrew Morton
@ 2008-02-17  4:39   ` Yoshinori Sato
  2008-02-17  4:55     ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Yoshinori Sato @ 2008-02-17  4:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

At Fri, 15 Feb 2008 22:29:49 -0800,
Andrew Morton wrote:
> 
> On Sat, 16 Feb 2008 01:13:37 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> 
> > initrd setting fix.
> > 
> >  arch/h8300/kernel/setup.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> > index b1f25c2..75712ec 100644
> > --- a/arch/h8300/kernel/setup.c
> > +++ b/arch/h8300/kernel/setup.c
> > @@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
> >  extern int _ramstart, _ramend;
> >  extern char _target_name[];
> >  extern void h8300_gpio_init(void);
> > +extern void *initrd_start, *initrd_end;
> >  
> >  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
> >      && defined(CONFIG_GDB_MAGICPRINT)
> > @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
> >  	/* allow for ROMFS on the end of the kernel */
> >  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
> >  #if defined(CONFIG_BLK_DEV_INITRD)
> > -		initrd_start = memory_start;
> > -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> > +		initrd_start = (void *)memory_start;
> > +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
> >  #else
> >  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
> >  #endif
> 
> But include/linux/initrd.h declares:
> 
> 	extern unsigned long initrd_start, initrd_end;
> 

fix it.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

 arch/h8300/kernel/setup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index 75712ec..4dd744f 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -30,6 +30,7 @@
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/initrd.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -57,7 +58,6 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
 extern int _ramstart, _ramend;
 extern char _target_name[];
 extern void h8300_gpio_init(void);
-extern void *initrd_start, *initrd_end;
 
 #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
     && defined(CONFIG_GDB_MAGICPRINT)
-- 
1.5.4.1

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-17  4:39   ` Yoshinori Sato
@ 2008-02-17  4:55     ` Andrew Morton
  2008-02-17  5:09       ` Yoshinori Sato
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2008-02-17  4:55 UTC (permalink / raw)
  To: Yoshinori Sato; +Cc: lkml

On Sat, 16 Feb 2008 23:39:09 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:

> At Fri, 15 Feb 2008 22:29:49 -0800,
> Andrew Morton wrote:
> > 
> > On Sat, 16 Feb 2008 01:13:37 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> > 
> > > initrd setting fix.
> > > 
> > >  arch/h8300/kernel/setup.c |    5 +++--
> > >  1 files changed, 3 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> > > index b1f25c2..75712ec 100644
> > > --- a/arch/h8300/kernel/setup.c
> > > +++ b/arch/h8300/kernel/setup.c
> > > @@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
> > >  extern int _ramstart, _ramend;
> > >  extern char _target_name[];
> > >  extern void h8300_gpio_init(void);
> > > +extern void *initrd_start, *initrd_end;
> > >  
> > >  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
> > >      && defined(CONFIG_GDB_MAGICPRINT)
> > > @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
> > >  	/* allow for ROMFS on the end of the kernel */
> > >  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
> > >  #if defined(CONFIG_BLK_DEV_INITRD)
> > > -		initrd_start = memory_start;
> > > -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> > > +		initrd_start = (void *)memory_start;
> > > +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
> > >  #else
> > >  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
> > >  #endif
> > 
> > But include/linux/initrd.h declares:
> > 
> > 	extern unsigned long initrd_start, initrd_end;
> > 
> 
> fix it.

I assume this new patch is an addition to the previous one quoted above?

> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> 
>  arch/h8300/kernel/setup.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index 75712ec..4dd744f 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -30,6 +30,7 @@
>  #include <linux/bootmem.h>
>  #include <linux/seq_file.h>
>  #include <linux/init.h>
> +#include <linux/initrd.h>
>  
>  #include <asm/setup.h>
>  #include <asm/irq.h>
> @@ -57,7 +58,6 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
>  extern int _ramstart, _ramend;
>  extern char _target_name[];
>  extern void h8300_gpio_init(void);
> -extern void *initrd_start, *initrd_end;
>  
>  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
>      && defined(CONFIG_GDB_MAGICPRINT)

If so then surely it generated a warning when assigning a void* to an
unsigned long.

So please send a complete new fully tested patch.  Please also include a
changelog which describes what is being fixed, and how it is fixed.  The
text "initrd setting fix." and "fit it" is not sufficient - it doesn't
tell us what was wrong with the old code, nor how the change improved it.

Thanks.

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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-17  4:55     ` Andrew Morton
@ 2008-02-17  5:09       ` Yoshinori Sato
  2008-02-17  5:27         ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Yoshinori Sato @ 2008-02-17  5:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

At Sat, 16 Feb 2008 20:55:02 -0800,
Andrew Morton wrote:
> 
> On Sat, 16 Feb 2008 23:39:09 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> 
> > At Fri, 15 Feb 2008 22:29:49 -0800,
> > Andrew Morton wrote:
> > > 
> > > On Sat, 16 Feb 2008 01:13:37 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> > > 
> > > > initrd setting fix.
> > > > 
> > > >  arch/h8300/kernel/setup.c |    5 +++--
> > > >  1 files changed, 3 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> > > > index b1f25c2..75712ec 100644
> > > > --- a/arch/h8300/kernel/setup.c
> > > > +++ b/arch/h8300/kernel/setup.c
> > > > @@ -57,6 +57,7 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
> > > >  extern int _ramstart, _ramend;
> > > >  extern char _target_name[];
> > > >  extern void h8300_gpio_init(void);
> > > > +extern void *initrd_start, *initrd_end;
> > > >  
> > > >  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
> > > >      && defined(CONFIG_GDB_MAGICPRINT)
> > > > @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
> > > >  	/* allow for ROMFS on the end of the kernel */
> > > >  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
> > > >  #if defined(CONFIG_BLK_DEV_INITRD)
> > > > -		initrd_start = memory_start;
> > > > -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> > > > +		initrd_start = (void *)memory_start;
> > > > +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
> > > >  #else
> > > >  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
> > > >  #endif
> > > 
> > > But include/linux/initrd.h declares:
> > > 
> > > 	extern unsigned long initrd_start, initrd_end;
> > > 
> > 
> > fix it.
> 
> I assume this new patch is an addition to the previous one quoted above?
> 
> > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> > 
> >  arch/h8300/kernel/setup.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> > index 75712ec..4dd744f 100644
> > --- a/arch/h8300/kernel/setup.c
> > +++ b/arch/h8300/kernel/setup.c
> > @@ -30,6 +30,7 @@
> >  #include <linux/bootmem.h>
> >  #include <linux/seq_file.h>
> >  #include <linux/init.h>
> > +#include <linux/initrd.h>
> >  
> >  #include <asm/setup.h>
> >  #include <asm/irq.h>
> > @@ -57,7 +58,6 @@ extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end;
> >  extern int _ramstart, _ramend;
> >  extern char _target_name[];
> >  extern void h8300_gpio_init(void);
> > -extern void *initrd_start, *initrd_end;
> >  
> >  #if (defined(CONFIG_H8300H_SIM) || defined(CONFIG_H8S_SIM)) \
> >      && defined(CONFIG_GDB_MAGICPRINT)
> 
> If so then surely it generated a warning when assigning a void* to an
> unsigned long.
> 
> So please send a complete new fully tested patch.  Please also include a
> changelog which describes what is being fixed, and how it is fixed.  The
> text "initrd setting fix." and "fit it" is not sufficient - it doesn't
> tell us what was wrong with the old code, nor how the change improved it.
> 
> Thanks.

Sorry. I mistake orign.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>

 arch/h8300/kernel/setup.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index b1f25c2..4dd744f 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -30,6 +30,7 @@
 #include <linux/bootmem.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/initrd.h>
 
 #include <asm/setup.h>
 #include <asm/irq.h>
@@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
 	/* allow for ROMFS on the end of the kernel */
 	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
 #if defined(CONFIG_BLK_DEV_INITRD)
-		initrd_start = memory_start;
-		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
+		initrd_start = (void *)memory_start;
+		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
 #else
 		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
 #endif

--
1.5.4.1

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

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

* Re: [PATCH 3/6] h8300 setup.c initrd support fix
  2008-02-17  5:09       ` Yoshinori Sato
@ 2008-02-17  5:27         ` Andrew Morton
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2008-02-17  5:27 UTC (permalink / raw)
  To: Yoshinori Sato; +Cc: lkml

On Sun, 17 Feb 2008 00:09:47 -0500 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:

> 
> Sorry. I mistake orign.
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> 

Please include a full description of your patches!

> 
> diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
> index b1f25c2..4dd744f 100644
> --- a/arch/h8300/kernel/setup.c
> +++ b/arch/h8300/kernel/setup.c
> @@ -30,6 +30,7 @@
>  #include <linux/bootmem.h>
>  #include <linux/seq_file.h>
>  #include <linux/init.h>
> +#include <linux/initrd.h>
>  
>  #include <asm/setup.h>
>  #include <asm/irq.h>
> @@ -99,8 +100,8 @@ void __init setup_arch(char **cmdline_p)
>  	/* allow for ROMFS on the end of the kernel */
>  	if (memcmp((void *)memory_start, "-rom1fs-", 8) == 0) {
>  #if defined(CONFIG_BLK_DEV_INITRD)
> -		initrd_start = memory_start;
> -		initrd_end = memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]);
> +		initrd_start = (void *)memory_start;
> +		initrd_end = (void *)(memory_start += be32_to_cpu(((unsigned long *) (memory_start))[2]));
>  #else
>  		memory_start += be32_to_cpu(((unsigned long *) memory_start)[2]);
>  #endif

This is still wrong.

initrd_start and initrd_end have type `unsigned long'.  But the
right-hand-side of these assignemtns has type void*.  THe compiler will
warn.



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

end of thread, other threads:[~2008-02-17  5:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-16  6:13 [PATCH 3/6] h8300 setup.c initrd support fix Yoshinori Sato
2008-02-16  6:22 ` Yoshinori Sato
2008-02-16  6:29 ` Andrew Morton
2008-02-17  4:39   ` Yoshinori Sato
2008-02-17  4:55     ` Andrew Morton
2008-02-17  5:09       ` Yoshinori Sato
2008-02-17  5:27         ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).