Skip to contentSkip to conversation

input: key_matrix: fix header inclusion

PATCH New Stephan Linz 4 participants 4 messages Aug 2, 2012 – Sep 2, 2012 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: key_matrix: fix header inclusion

On Microblaze with device tree support enabled we run into the error below.

I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here

CC Bernie Thompson <[email protected]>
CC Simon Glass <[email protected]>
CC Tom Warren <[email protected]>
CC Michal Simek <[email protected]>
---
 drivers/input/key_matrix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/key_matrix.c +1 -0
index 84b898f..715e57a 100644
@@ -23,6 +23,7 @@
  * MA 02111-1307 USA
  */
 
+#include <common.h>
 #include <fdtdec.h>
 #include <key_matrix.h>
 #include <malloc.h>
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 input: key_matrix: fix header inclusion

Quoted 15 lines · Stephan Linz

On Microblaze with device tree support enabled we run into the error below.

I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Quoted 5 lines
CC Bernie Thompson <[email protected]>
CC Simon Glass <[email protected]>
CC Tom Warren <[email protected]>
CC Michal Simek <[email protected]>
Quoted 19 lines
---
 drivers/input/key_matrix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/key_matrix.c +1 -1
index 84b898f..715e57a 100644
@@ -23,6 +23,7 @@
  * MA 02111-1307 USA
  */
 
+#include <common.h>
 #include <fdtdec.h>
 #include <key_matrix.h>
 #include <malloc.h>
--

1.7.0.4

#2 lore raw

PATCH 1/1 input: key_matrix: fix header inclusion

Quoted 16 lines · Simon Glass
Quoted 15 lines · Stephan Linz

On Microblaze with device tree support enabled we run into the error below.

I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Quoted 7 lines
Quoted 5 lines
CC Bernie Thompson <[email protected]>
CC Simon Glass <[email protected]>
CC Tom Warren <[email protected]>
CC Michal Simek <[email protected]>

Thanks,
Michal

Signature · 4 lines
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
#3 lore raw

PATCH 1/1 input: key_matrix: fix header inclusion

In reply to Stephan Linz

Dear Stephan Linz,

Quoted 15 lines · In message <[email protected]> you wrote:

On Microblaze with device tree support enabled we run into the error below.

I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture.

The error is:

In file included from key_matrix.c:29:
include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here

Quoted 8 lines
CC Bernie Thompson <[email protected]>
CC Simon Glass <[email protected]>
CC Tom Warren <[email protected]>
CC Michal Simek <[email protected]>
---
 drivers/input/key_matrix.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
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
Yes, it is written.  Good shall always destroy evil.
	-- Sirah the Yang, "The Omega Glory", stardate unknown