diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-29 13:07:07 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-29 13:07:07 +0000 |
commit | c6fed62d34b230b043a9047721dfc40b9ab4728b (patch) | |
tree | d193c375ccd208f4a1f5f50c8d5b3afd02402f0e | |
parent | c1ca1beb4517c8bbf09ee43beba4c43b3c61ee64 (diff) |
Test bit is used like a boolean, so it must actually be a boolean.
This was causing swizzling on bit 17 swizzling intel IGDs when not
needed. Thanks to Brandon Mercer for testing.
-rw-r--r-- | sys/dev/pci/drm/drm_atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_atomic.h b/sys/dev/pci/drm/drm_atomic.h index 554a5621a39..07ee13162d3 100644 --- a/sys/dev/pci/drm/drm_atomic.h +++ b/sys/dev/pci/drm/drm_atomic.h @@ -128,7 +128,7 @@ set_bit(u_int b, volatile void *p) static __inline int test_bit(u_int b, volatile void *p) { - return ((volatile u_int *)p)[b >> 5] & (1 << (b & 0x1f)); + return !!(((volatile u_int *)p)[b >> 5] & (1 << (b & 0x1f))); } static __inline int |