diff options
| author | Dave Airlie <airlied@redhat.com> | 2014-12-02 10:58:33 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2014-12-02 10:58:33 +1000 |
| commit | e8115e79aa62b6ebdb3e8e61ca4092cc32938afc (patch) | |
| tree | 42b791ab54ef9d5c73dcd49f907b8b37fa2f7e19 /include/linux/bitops.h | |
| parent | 9be23ae4350bfd71c0cc2ea3494671ee90e5603b (diff) | |
| parent | 009d0431c3914de64666bec0d350e54fdd59df6a (diff) | |
| download | cachepc-linux-e8115e79aa62b6ebdb3e8e61ca4092cc32938afc.tar.gz cachepc-linux-e8115e79aa62b6ebdb3e8e61ca4092cc32938afc.zip | |
Merge tag 'v3.18-rc7' into drm-next
This fixes a bunch of conflicts prior to merging i915 tree.
Linux 3.18-rc7
Conflicts:
drivers/gpu/drm/exynos/exynos_drm_drv.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/tegra/dc.c
Diffstat (limited to 'include/linux/bitops.h')
| -rw-r--r-- | include/linux/bitops.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index be5fd38bd5a0..5d858e02997f 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -18,8 +18,11 @@ * position @h. For example * GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#define GENMASK(h, l) (((U32_C(1) << ((h) - (l) + 1)) - 1) << (l)) -#define GENMASK_ULL(h, l) (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l)) +#define GENMASK(h, l) \ + (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) + +#define GENMASK_ULL(h, l) \ + (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) extern unsigned int __sw_hweight8(unsigned int w); extern unsigned int __sw_hweight16(unsigned int w); |
