summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-07-04 15:50:23 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-07-04 16:38:04 +0100
commitaf1346a0f38fe5b762729a91ed10c7c7f59b76c9 (patch)
treed00f3d3b6e9f7ae9c734030e703856f55bec8339 /drivers/gpu/drm/i915/i915_irq.c
parentf19ec8cb5a4e16299840be6220308793d443de3f (diff)
drm/i915: Explicitly convert some macros to boolean values
Some IS_ and HAS_ macros can return any non-zero value for true. One potential problem with that is that someone could assign them to integers and be surprised with the result. Therefore it is probably safer to do the conversion to 0/1 in the macros themselves. Luckily this does not seem to have an effect on code size. Only one call site was getting bit by this and a patch for that has been sent as "drm/i915/guc: Protect against HAS_GUC_* returning true values other than one". v2: Added some extra braces as suggested by checkpatch. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1467643823-9798-1-git-send-email-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
0 files changed, 0 insertions, 0 deletions