linux/include
Rasmus Villemoes dba94c2553 lib: bitmap: change bitmap_shift_left to take unsigned parameters
gcc can generate slightly better code for stuff like "nbits %
BITS_PER_LONG" when it knows nbits is not negative.  Since negative size
bitmaps or shift amounts don't make sense, change these parameters of
bitmap_shift_right to unsigned.

If off >= lim (which requires shift >= nbits), k is initialized with a
large positive value, but since I've let k continue to be signed, the loop
will never run and dst will be zeroed as expected.  Inside the loop, k is
guaranteed to be non-negative, so the fact that it is promoted to unsigned
in the various expressions it appears in is harmless.

Also use "shift" and "nbits" consistently for the parameter names.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:35 -08:00
..
acpi kernel.h: remove ancient __FUNCTION__ hack 2015-02-12 18:54:13 -08:00
asm-generic mm: remove remaining references to NUMA hinting bits and helpers 2015-02-12 18:54:08 -08:00
clocksource
crypto crypto: switch af_alg_make_sg() to iov_iter 2015-02-04 01:34:15 -05:00
drm
dt-bindings This is the bulk of pin control changes for the v3.20 cycle: 2015-02-11 11:23:13 -08:00
keys
kvm arm/arm64: KVM: allow userland to request a virtual GICv3 2015-01-20 18:25:33 +01:00
linux lib: bitmap: change bitmap_shift_left to take unsigned parameters 2015-02-13 21:21:35 -08:00
math-emu
media [media] tea575x: split and export functions 2015-01-27 10:13:50 -02:00
memory
misc
net memcg: cleanup static keys decrement 2015-02-12 18:54:10 -08:00
pcmcia
ras
rdma Revert "IB/core: Add support for extended query device caps" 2015-02-06 00:54:33 -08:00
rxrpc
scsi Merge branch 'for-3.20/core' of git://git.kernel.dk/linux-block 2015-02-12 14:13:23 -08:00
soc
sound ALSA: pcm: allow for trigger_tstamp snapshot in .trigger 2015-02-09 16:01:53 +01:00
target
trace Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
uapi Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
video OMAPDSS: add define for DRA7xx HW version 2015-02-04 12:32:04 +02:00
xen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-02-10 20:01:30 -08:00
Kbuild