]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check mask/bit helper functions
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Dec 2014 15:30:00 +0000 (16:30 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Dec 2014 15:30:00 +0000 (16:30 +0100)
commit8d746f4a8538575ef0c276b418f29f5b2e8500ab
tree05e11e66a229b6561f3619881eb33e08af4a62ba
parent44fce204faa981477cf6ba5534ad203841dd0c1e
drm/i915: Check mask/bit helper functions

After a bit of irc discussion we've concluded that it would be prudent
to check that callers use the mask/enable paramters correctly. So add
a WARN_ON.

Spurred by Damien's bugfix which added _MASKED_FIELD.

v2: We use WARN_ON(1) a lot to catch default cases in switch blocks
which should always be extended. So this doesn't work really. Dunno
why gcc only started complaining when I've moved the WARN out of the
static inline helper to address a feedback from Jani.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
drivers/gpu/drm/i915/i915_irq.c