From: Rasmus Villemoes Date: Fri, 13 Feb 2015 22:36:08 +0000 (-0800) Subject: lib: bitmap: remove redundant code from __bitmap_shift_right X-Git-Tag: fixes-v4.0-rc1~107^2~103 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97fb8e940bc56b157517c812c9c6cbfc83d48d78;p=pandora-kernel.git lib: bitmap: remove redundant code from __bitmap_shift_right If the condition k==lim-1 is true, we must have off == 0 (otherwise, k could never become that big). But in that case we have upper == 0 and hence dst[k] == (src[k] & mask) >> rem. Since mask consists of a consecutive range of bits starting from the LSB, anding dst[k] with mask is a no-op. Signed-off-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed