Message ID | 20181010051308.25422-3-mpe@ellerman.id.au (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | [1/4] powerpc: Move core kernel logic into arch/powerpc/Kbuild | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | next/apply_patch Successfully applied |
snowpatch_ozlabs/checkpatch | success | Test checkpatch on branch next |
On Tue, Oct 9, 2018 at 10:13 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: > Upstream has declared that Variable Length Array's (VLAs) are a bad > idea, and eventually -Wvla will be added to the top-level Makefile. We > can go one better and make sure we don't introduce any more by adding > it to the arch Makefile. > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > --- > arch/powerpc/Kbuild | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild > index 1625a06802ca..86b261d6bde5 100644 > --- a/arch/powerpc/Kbuild > +++ b/arch/powerpc/Kbuild > @@ -1,4 +1,5 @@ > -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror > +subdir-ccflags-y := $(call cc-option, -Wvla) > +subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror > > obj-y += kernel/ > obj-y += mm/ -Wvla will be going into the top-level Makefile in the merge window (see linux-next), so this will be redundant. -Kees
Kees Cook <keescook@chromium.org> writes: > On Tue, Oct 9, 2018 at 10:13 PM, Michael Ellerman <mpe@ellerman.id.au> wrote: >> Upstream has declared that Variable Length Array's (VLAs) are a bad >> idea, and eventually -Wvla will be added to the top-level Makefile. We >> can go one better and make sure we don't introduce any more by adding >> it to the arch Makefile. >> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> >> --- >> arch/powerpc/Kbuild | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild >> index 1625a06802ca..86b261d6bde5 100644 >> --- a/arch/powerpc/Kbuild >> +++ b/arch/powerpc/Kbuild >> @@ -1,4 +1,5 @@ >> -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror >> +subdir-ccflags-y := $(call cc-option, -Wvla) >> +subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror >> >> obj-y += kernel/ >> obj-y += mm/ > > -Wvla will be going into the top-level Makefile in the merge window > (see linux-next), so this will be redundant. Thanks, yeah I saw that after I posted. Will drop this one. cheers
diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild index 1625a06802ca..86b261d6bde5 100644 --- a/arch/powerpc/Kbuild +++ b/arch/powerpc/Kbuild @@ -1,4 +1,5 @@ -subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror +subdir-ccflags-y := $(call cc-option, -Wvla) +subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror obj-y += kernel/ obj-y += mm/
Upstream has declared that Variable Length Array's (VLAs) are a bad idea, and eventually -Wvla will be added to the top-level Makefile. We can go one better and make sure we don't introduce any more by adding it to the arch Makefile. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- arch/powerpc/Kbuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)