Skip to content

Commit 118182e

Browse files
ickledanvet
authored andcommitted
drm/i915: Force clean compilation with -Werror
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.) v2: Kick off a new "Debugging" submenu for i915.ko Signed-off-by: Chris Wilson <[email protected]> Acked-by: Jani Nikula <[email protected]> [danvet: Add "DRM i915" to the menu name as requested by Chris.] Signed-off-by: Daniel Vetter <[email protected]>
1 parent 16e44e3 commit 118182e

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

drivers/gpu/drm/i915/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,11 @@ config DRM_I915_PRELIMINARY_HW_SUPPORT
7171
option changes the default for that module option.
7272

7373
If in doubt, say "N".
74+
75+
menu "DRM i915 Debugging"
76+
77+
depends on DRM_I915
78+
79+
source drivers/gpu/drm/i915/Kconfig.debug
80+
81+
endmenu

drivers/gpu/drm/i915/Kconfig.debug

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
config DRM_I915_WERROR
2+
bool "Force GCC to throw an error instead of a warning when compiling"
3+
default n
4+
---help---
5+
Add -Werror to the build flags for (and only for) i915.ko

drivers/gpu/drm/i915/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Makefile for the drm device driver. This driver provides support for the
33
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
44

5+
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
6+
57
# Please keep these build lists sorted!
68

79
# core driver code

0 commit comments

Comments
 (0)