drm/i915: Force clean compilation with -Werror
diff mbox

Message ID 1432118128-10464-1-git-send-email-chris@chris-wilson.co.uk
State New
Headers show

Commit Message

Chris Wilson May 20, 2015, 10:35 a.m. UTC
Our driver compiles clean (nowadays thanks to 0day) but for me, at least,
it would be beneficial if the compiler threw an error rather than a
warning when it found a piece of suspect code. (I use this to
compile-check patch series and want to break on the first compiler error
in order to fix the patch.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lespiau, Damien May 20, 2015, 12:52 p.m. UTC | #1
On Wed, May 20, 2015 at 11:35:28AM +0100, Chris Wilson wrote:
> Our driver compiles clean (nowadays thanks to 0day) but for me, at least,
> it would be beneficial if the compiler threw an error rather than a
> warning when it found a piece of suspect code. (I use this to
> compile-check patch series and want to break on the first compiler error
> in order to fix the patch.)
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Just to repeat what was said on IRC. -Werror is usally a no-go outside
of a development environment because different compilers (which includes
different compiler versions) will have different sets of warnings, even
with the same options. It also breaks bisecting if, for instance, or
more recent toolchain produces a warning that it didn't in a previous
version and we're trying to compile an old commit.
Shuang He May 21, 2015, 12:17 p.m. UTC | #2
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6438
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                 -1              315/315              314/315
IVB                                  343/343              343/343
BYT                                  287/287              287/287
BDW                                  321/321              321/321
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
*SNB  igt@pm_rpm@dpms-mode-unset-non-lpsp      PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index b7ddf48e1d75..5b2a6e039500 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -2,6 +2,8 @@ 
 # Makefile for the drm device driver.  This driver provides support for the
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
+subdir-ccflags-y := -Werror
+
 # Please keep these build lists sorted!
 
 # core driver code