From: Brian Norris <computersforpeace@gmail.com>
To: Ian Munsie <imunsie@au1.ibm.com>, Michael Neuling <mikey@neuling.org>
Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
Brian Norris <computersforpeace@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Joe Perches <joe@perches.com>,
Michal Marek <mmarek@suse.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Anton Blanchard <anton@au1.ibm.com>
Subject: [PATCH v2 2/2] cxl: use -Werror only with CONFIG_PPC_WERROR
Date: Fri, 8 Jan 2016 10:30:10 -0800 [thread overview]
Message-ID: <1452277810-98195-2-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1452277810-98195-1-git-send-email-computersforpeace@gmail.com>
Some developers really like to have -Werror enabled for their code, as
it helps to ensure warning free code. Others don't want -Werror, as it
(for example) can cause problems when newer (or older) compilers have
different sets of warnings, or new warnings can appear just when turning
up the warning level (e.g., make W=1 or W=2). Thus, it seems prudent to
have the use of -Werror be configurable.
It so happens that cxl is only built on PowerPC, and PowerPC already
has a nice set of Kconfig options for this, under CONFIG_PPC_WERROR. So
let's use that, and the world is a happy place again! (Note that
PPC_WERROR defaults to =y, so the common case compile should still be
enforcing -Werror.)
Fixes: d3d73f4b38a8 ("cxl: Compile with -Werror")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
v2: new in v2
drivers/misc/cxl/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile
index ab6f392d3504..be2ac5ce349f 100644
--- a/drivers/misc/cxl/Makefile
+++ b/drivers/misc/cxl/Makefile
@@ -1,4 +1,5 @@
-ccflags-y := -Werror $(call cc-disable-warning, unused-const-variable)
+ccflags-y := $(call cc-disable-warning, unused-const-variable)
+ccflags-$(CONFIG_PPC_WERROR) += -Werror
cxl-y += main.o file.o irq.o fault.o native.o
cxl-y += context.o sysfs.o debugfs.o pci.o trace.o
--
2.6.0.rc2.230.g3dd15c0
next prev parent reply other threads:[~2016-01-08 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 18:30 [PATCH v2 1/2] cxl: fix build for GCC 4.6.x Brian Norris
2016-01-08 18:30 ` Brian Norris [this message]
2016-01-12 12:32 ` [v2,2/2] cxl: use -Werror only with CONFIG_PPC_WERROR Michael Ellerman
2016-01-12 12:32 ` [v2,1/2] cxl: fix build for GCC 4.6.x Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452277810-98195-2-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=anton@au1.ibm.com \
--cc=arnd@arndb.de \
--cc=imunsie@au1.ibm.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mmarek@suse.com \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).