Message ID | 1467616182-30886-5-git-send-email-dja@axtens.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 04/07/16 17:09, Daniel Axtens wrote: > Explicitly give sparse an endianness in the Makefile, so that it > doesn't get confused. > > Normally we have #ifdef one and #else the other, so it doesn't usually > matter, but we have been bitten by it before, and indeed this patch > fixes a number of sparse errors. > > Suggested-by: Arnd Bergmann <arnd@arndb.de> > Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
On Monday, July 4, 2016 5:09:41 PM CEST Daniel Axtens wrote: > --- > arch/powerpc/Makefile | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 709a22a3e824..8617c71c3bdb 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -181,6 +181,11 @@ KBUILD_CFLAGS += -pipe -Iarch/$(ARCH) $(CFLAGS-y) > CPP = $(CC) -E $(KBUILD_CFLAGS) > > CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ > +ifdef CONFIG_CPU_BIG_ENDIAN > +CHECKFLAGS += -D__BIG_ENDIAN__ > +else > +CHECKFLAGS += -D__LITTLE_ENDIAN__ > +endif > > KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o Looks good, thanks! I've taken a short look at the other patches in the series too and found a few minor glitches, the rest looks good to me. Arnd
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 709a22a3e824..8617c71c3bdb 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -181,6 +181,11 @@ KBUILD_CFLAGS += -pipe -Iarch/$(ARCH) $(CFLAGS-y) CPP = $(CC) -E $(KBUILD_CFLAGS) CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ +ifdef CONFIG_CPU_BIG_ENDIAN +CHECKFLAGS += -D__BIG_ENDIAN__ +else +CHECKFLAGS += -D__LITTLE_ENDIAN__ +endif KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
Explicitly give sparse an endianness in the Makefile, so that it doesn't get confused. Normally we have #ifdef one and #else the other, so it doesn't usually matter, but we have been bitten by it before, and indeed this patch fixes a number of sparse errors. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Daniel Axtens <dja@axtens.net> --- arch/powerpc/Makefile | 5 +++++ 1 file changed, 5 insertions(+)