bitops: Fix shift overflow in GENMASK macros
Based on the original patch for linux:

	commit 00b4d9a
	Author: Maxime COQUELIN <maxime.coquelin@st.com>
	Date:   Thu Nov 6 10:54:19 2014

	On some 32 bits architectures, including x86, GENMASK(31, 0) returns 0
	instead of the expected ~0UL.

	This is the same on some 64 bits architectures with GENMASK_ULL(63, 0).

	This is due to an overflow in the shift operand, 1 << 32 for GENMASK,
	1 << 64 for GENMASK_ULL.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
1 parent ba24403 commit 7ffff00dfdcd4ea28b9edf8420dac8ba53061491
@Steffen Trumtrar Steffen Trumtrar authored on 8 Dec 2015
Sascha Hauer committed on 3 Feb 2016
Showing 1 changed file
View
include/linux/bitops.h