All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/boot: Remove duplicate typedefs from libfdt_env.h
@ 2018-03-16 21:54 Mark Greer
  2018-03-19  8:53 ` Christophe LEROY
  2018-04-03 16:03 ` Michael Ellerman
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Greer @ 2018-03-16 21:54 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: linuxppc-dev, Mark Greer, David Gibson, Oliver O'Halloran

When building a uImage or zImage using ppc6xx_defconfig and some other
defconfigs, the following error occurs:

  BOOTCC  arch/powerpc/boot/fdt.o
  In file included from arch/powerpc/boot/fdt.c:51:0:
  ../arch/powerpc/boot/libfdt_env.h:10:13: error: redefinition of typedef 'uint32_t'
  ../arch/powerpc/boot/types.h:21:13: note: previous declaration of 'uint32_t' was here
  ../arch/powerpc/boot/libfdt_env.h:11:13: error: redefinition of typedef 'uint64_t'
  ../arch/powerpc/boot/types.h:22:13: note: previous declaration of 'uint64_t' was here
  ../arch/powerpc/boot/Makefile:210: recipe for target 'arch/powerpc/boot/fdt.o' failed
  make[2]: *** [arch/powerpc/boot/fdt.o] Error 1

The problem is that commit 656ad58ef19e (powerpc/boot: Add OPAL console
to epapr wrappers) adds typedefs for uint32_t and uint64_t to type.h but
doesn't remove the pre-existing (and now duplicate) typedefs from
libfdt_env.h.  Fix the error by removing the duplicat typedefs from
libfdt_env.h

CC: David Gibson <david@gibson.dropbear.id.au>
CC: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Mark Greer <mgreer@animalcreek.com>
---
Having said all of that, commit 656ad58ef19e (powerpc/boot: Add OPAL
console to epapr wrappers) went into mainline back in 2016 so, AFAICT,
this has been broken since then.  That seems unlikely so I must be
missing something...  Any ideas what that is?

I built all of the defconfigs that I had toolchains handy for (really
just old-fashioned ppc32, non-booke) so I didn't test everything.
Compile tested only as I no longer have any relevant hardware.

Based on git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux fixes
currently at e4b79900222b (powerpc/64s: Fix NULL AT_BASE_PLATFORM when
using DT CPU features).

 arch/powerpc/boot/libfdt_env.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
index f52c31b1f48f..2a0c8b1bf147 100644
--- a/arch/powerpc/boot/libfdt_env.h
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -7,8 +7,6 @@
 
 #include "of.h"
 
-typedef u32 uint32_t;
-typedef u64 uint64_t;
 typedef unsigned long uintptr_t;
 
 typedef __be16 fdt16_t;
-- 
2.16.1

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

end of thread, other threads:[~2018-04-03 16:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 21:54 [PATCH] powerpc/boot: Remove duplicate typedefs from libfdt_env.h Mark Greer
2018-03-19  8:53 ` Christophe LEROY
2018-03-19 16:02   ` Mark Greer
2018-03-19 17:35     ` christophe leroy
2018-03-19 23:55     ` Oliver
2018-03-30  2:22       ` Mark Greer
2018-03-30  2:26         ` Mark Greer
2018-03-31  2:42           ` Mark Greer
2018-04-03 16:03 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.