linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mtd related Cobalt build failure with current git
@ 2009-07-04 21:37 Martin Michlmayr
  2009-07-05 11:10 ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Michlmayr @ 2009-07-04 21:37 UTC (permalink / raw)
  To: Yoichi Yuasa, linux-mips; +Cc: dwmw2

I get the following Cobalt build failure with current git:

  CC      arch/mips/cobalt/mtd.o
cc1: warnings being treated as errors
In file included from arch/mips/cobalt/mtd.c:22:
include/linux/mtd/partitions.h:50: warning: ‘struct mtd_info’ declared inside parameter list
include/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mtd/partitions.h:51: warning: ‘struct mtd_info’ declared inside parameter list
include/linux/mtd/partitions.h:61: warning: ‘struct mtd_info’ declared inside parameter list
include/linux/mtd/partitions.h:67: warning: ‘struct mtd_info’ declared inside parameter list
make[1]: *** [arch/mips/cobalt/mtd.o] Error 1
make: *** [arch/mips/cobalt] Error 2

Does anyone know if there's a fix for this already?
-- 
Martin Michlmayr
http://www.cyrius.com/

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

* Re: mtd related Cobalt build failure with current git
  2009-07-04 21:37 mtd related Cobalt build failure with current git Martin Michlmayr
@ 2009-07-05 11:10 ` Florian Fainelli
  2009-07-06 15:38   ` Martin Michlmayr
  2009-07-10  6:03   ` Artem Bityutskiy
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2009-07-05 11:10 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: Yoichi Yuasa, linux-mips, dwmw2

Hi Martin,

Le Saturday 04 July 2009 23:37:41 Martin Michlmayr, vous avez écrit :
> I get the following Cobalt build failure with current git:
>
>   CC      arch/mips/cobalt/mtd.o
> cc1: warnings being treated as errors
> In file included from arch/mips/cobalt/mtd.c:22:
> include/linux/mtd/partitions.h:50: warning: ‘struct mtd_info’ declared
> inside parameter list include/linux/mtd/partitions.h:50: warning: its scope
> is only this definition or declaration, which is probably not what you want
> include/linux/mtd/partitions.h:51: warning: ‘struct mtd_info’ declared
> inside parameter list include/linux/mtd/partitions.h:61: warning: ‘struct
> mtd_info’ declared inside parameter list include/linux/mtd/partitions.h:67:
> warning: ‘struct mtd_info’ declared inside parameter list make[1]: ***
> [arch/mips/cobalt/mtd.o] Error 1
> make: *** [arch/mips/cobalt] Error 2
>
> Does anyone know if there's a fix for this already?

I also had that problem and did the following fix, which still applies to
the mtd-2.6 tree, master branch.
--
From: Florian Fainelli <florian@openwrt.org>
Subject: [PATCH] Fix arch/mips/cobalt/mtd.c build failure

This patch fixes a warning in include/linux/mtd/partitions which
results in the following build failure on MIPS:
 CC arch/mips/cobalt/mtd.o
cc1: warnings being treated as errors
In file included from arch/mips/cobalt/mtd.c:22:
include/linux/mtd/partitions.h:50: warning: 'struct mtd_info' declared inside parameter list
include/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mtd/partitions.h:51: warning: 'struct mtd_info' declared inside parameter list
include/linux/mtd/partitions.h:61: warning: 'struct mtd_info' declared inside parameter list
include/linux/mtd/partitions.h:67: warning: 'struct mtd_info' declared inside parameter list
make[1]: *** [arch/mips/cobalt/mtd.o] Error 1
make: *** [arch/mips/cobalt] Error 2

Reported-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index af6dcb9..c8eaf44 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -10,7 +10,7 @@
 #define MTD_PARTITIONS_H
 
 #include <linux/types.h>
-
+#include <linux/mtd/mtd.h>
 
 /*
  * Partition definition structure:

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

* Re: mtd related Cobalt build failure with current git
  2009-07-05 11:10 ` Florian Fainelli
@ 2009-07-06 15:38   ` Martin Michlmayr
  2009-07-10  6:03   ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Michlmayr @ 2009-07-06 15:38 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: Yoichi Yuasa, linux-mips, dwmw2

* Florian Fainelli <florian@openwrt.org> [2009-07-05 13:10]:
> > Does anyone know if there's a fix for this already?
> 
> I also had that problem and did the following fix, which still applies to
> the mtd-2.6 tree, master branch.

Thanks, Florian!
-- 
Martin Michlmayr
http://www.cyrius.com/

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

* Re: mtd related Cobalt build failure with current git
  2009-07-05 11:10 ` Florian Fainelli
  2009-07-06 15:38   ` Martin Michlmayr
@ 2009-07-10  6:03   ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2009-07-10  6:03 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: Martin Michlmayr, linux-mips, dwmw2, Yoichi Yuasa

On Sun, 2009-07-05 at 13:10 +0200, Florian Fainelli wrote:
> Hi Martin,
> 
> Le Saturday 04 July 2009 23:37:41 Martin Michlmayr, vous avez écrit :
> > I get the following Cobalt build failure with current git:
> >
> >   CC      arch/mips/cobalt/mtd.o
> > cc1: warnings being treated as errors
> > In file included from arch/mips/cobalt/mtd.c:22:
> > include/linux/mtd/partitions.h:50: warning: ‘struct mtd_info’ declared
> > inside parameter list include/linux/mtd/partitions.h:50: warning: its scope
> > is only this definition or declaration, which is probably not what you want
> > include/linux/mtd/partitions.h:51: warning: ‘struct mtd_info’ declared
> > inside parameter list include/linux/mtd/partitions.h:61: warning: ‘struct
> > mtd_info’ declared inside parameter list include/linux/mtd/partitions.h:67:
> > warning: ‘struct mtd_info’ declared inside parameter list make[1]: ***
> > [arch/mips/cobalt/mtd.o] Error 1
> > make: *** [arch/mips/cobalt] Error 2
> >
> > Does anyone know if there's a fix for this already?
> 
> I also had that problem and did the following fix, which still applies to
> the mtd-2.6 tree, master branch.
> --
> From: Florian Fainelli <florian@openwrt.org>
> Subject: [PATCH] Fix arch/mips/cobalt/mtd.c build failure
> 
> This patch fixes a warning in include/linux/mtd/partitions which
> results in the following build failure on MIPS:
>  CC arch/mips/cobalt/mtd.o
> cc1: warnings being treated as errors
> In file included from arch/mips/cobalt/mtd.c:22:
> include/linux/mtd/partitions.h:50: warning: 'struct mtd_info' declared inside parameter list
> include/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you want
> include/linux/mtd/partitions.h:51: warning: 'struct mtd_info' declared inside parameter list
> include/linux/mtd/partitions.h:61: warning: 'struct mtd_info' declared inside parameter list
> include/linux/mtd/partitions.h:67: warning: 'struct mtd_info' declared inside parameter list
> make[1]: *** [arch/mips/cobalt/mtd.o] Error 1
> make: *** [arch/mips/cobalt] Error 2
> 
> Reported-by: Martin Michlmayr <tbm@cyrius.com>
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
> index af6dcb9..c8eaf44 100644
> --- a/include/linux/mtd/partitions.h
> +++ b/include/linux/mtd/partitions.h
> @@ -10,7 +10,7 @@
>  #define MTD_PARTITIONS_H
>  
>  #include <linux/types.h>
> -
> +#include <linux/mtd/mtd.h>

Can you instead add

a struct mtd_info forward-declaration?

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

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

end of thread, other threads:[~2009-07-10  6:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-04 21:37 mtd related Cobalt build failure with current git Martin Michlmayr
2009-07-05 11:10 ` Florian Fainelli
2009-07-06 15:38   ` Martin Michlmayr
2009-07-10  6:03   ` Artem Bityutskiy

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).