aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rbtree.h
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-09-08 16:14:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 18:26:48 -0700
commitc32ee3d9abd284b4fcaacc250b101f93829c7bae (patch)
tree14da37d4c3debe116e378f3de20099babf0de1c3 /include/linux/rbtree.h
parentinclude: warn for inconsistent endian config definition (diff)
downloadlinux-dev-c32ee3d9abd284b4fcaacc250b101f93829c7bae.tar.xz
linux-dev-c32ee3d9abd284b4fcaacc250b101f93829c7bae.zip
bitops: avoid integer overflow in GENMASK(_ULL)
GENMASK(_ULL) performs a left-shift of ~0UL(L), which technically results in an integer overflow. clang raises a warning if the overflow occurs in a preprocessor expression. Clear the low-order bits through a substraction instead of the left-shift to avoid the overflow. (akpm: no change in .text size in my testing) Link: http://lkml.kernel.org/r/20170803212020.24939-1-mka@chromium.org Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rbtree.h')
0 files changed, 0 insertions, 0 deletions