mtd related Cobalt build failure with current git
Subsystems (2)
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?
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Hi Martin,
Le Saturday 04 July 2009 23:37:41 Martin Michlmayr, vous avez écrit :
Quoted 15 lines
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 fromarch/mips/cobalt/mtd.c:22:include/linux/mtd/partitions.h:50: warning: ‘struct mtd_info’ declared inside parameter listinclude/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you wantinclude/linux/mtd/partitions.h:51: warning: ‘struct mtd_info’ declared inside parameter listinclude/linux/mtd/partitions.h:61: warning: ‘struct mtd_info’ declared inside parameter listinclude/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
Quoted 1 line
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 <[email protected]>
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
---
include/linux/mtd/partitions.h +1 -1
@@ -10,7 +10,7 @@#define MTD_PARTITIONS_H #include <linux/types.h> - +#include <linux/mtd/mtd.h> /* * Partition definition structure:
Quoted 4 lines · Florian Fainelli
Quoted 1 line
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!
Signature · 2 lines
Martin Michlmayr http://www.cyrius.com/
Quoted 47 lines · Florian Fainelli
Hi Martin,
Le Saturday 04 July 2009 23:37:41 Martin Michlmayr, vous avez écrit :
Quoted 15 lines
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 fromarch/mips/cobalt/mtd.c:22:include/linux/mtd/partitions.h:50: warning: ‘struct mtd_info’ declared inside parameter listinclude/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you wantinclude/linux/mtd/partitions.h:51: warning: ‘struct mtd_info’ declared inside parameter listinclude/linux/mtd/partitions.h:61: warning: ‘struct mtd_info’ declared inside parameter listinclude/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 2Quoted 1 line
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 <[email protected]>
Subject: [PATCH] Fixarch/mips/cobalt/mtd.cbuild failureThis patch fixes a warning in
include/linux/mtd/partitionswhich
results in the following build failure on MIPS:
CCarch/mips/cobalt/mtd.o
cc1: warnings being treated as errors
In file included fromarch/mips/cobalt/mtd.c:22:include/linux/mtd/partitions.h:50: warning: 'structmtd_info' declared inside parameter listinclude/linux/mtd/partitions.h:50: warning: its scope is only this definition or declaration, which is probably not what you wantinclude/linux/mtd/partitions.h:51: warning: 'structmtd_info' declared inside parameter listinclude/linux/mtd/partitions.h:61: warning: 'structmtd_info' declared inside parameter listinclude/linux/mtd/partitions.h:67: warning: 'structmtd_info' declared inside parameter list
make[1]: *** [arch/mips/cobalt/mtd.o] Error 1
make: *** [arch/mips/cobalt] Error 2Reported-by Martin Michlmayr <[email protected]>Signed-off-by Florian Fainelli <[email protected]>---
include/linux/mtd/partitions.h +0
-0
include/linux/mtd/partitions.h line 13
Quoted 5 lines
include/linux/mtd/partitions.h +1
-1@@ -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?
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)