The patch titled Subject: lib: bitmap: remove redundant code from __bitmap_shift_left has been removed from the -mm tree. Its filename was lib-bitmap-remove-redundant-code-from-__bitmap_shift_left.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Subject: lib: bitmap: remove redundant code from __bitmap_shift_left The first of these conditionals is completely redundant: If k == lim-1, we must have off==0, so the second conditional will also trigger and then it wouldn't matter if upper had some high bits set. But the second conditional is in fact also redundant, since it only serves to clear out some high-order "don't care" bits of dst, about which no guarantee is made. Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/bitmap.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff -puN lib/bitmap.c~lib-bitmap-remove-redundant-code-from-__bitmap_shift_left lib/bitmap.c --- a/lib/bitmap.c~lib-bitmap-remove-redundant-code-from-__bitmap_shift_left +++ a/lib/bitmap.c @@ -159,7 +159,7 @@ void __bitmap_shift_left(unsigned long * unsigned int shift, unsigned int nbits) { int k; - unsigned int lim = BITS_TO_LONGS(nbits), left = nbits % BITS_PER_LONG; + unsigned int lim = BITS_TO_LONGS(nbits); unsigned int off = shift/BITS_PER_LONG, rem = shift % BITS_PER_LONG; for (k = lim - off - 1; k >= 0; --k) { unsigned long upper, lower; @@ -172,13 +172,8 @@ void __bitmap_shift_left(unsigned long * lower = src[k - 1] >> (BITS_PER_LONG - rem); else lower = 0; - upper = src[k]; - if (left && k == lim - 1) - upper &= (1UL << left) - 1; - upper <<= rem; + upper = src[k] << rem; dst[k + off] = lower | upper; - if (left && k + off == lim - 1) - dst[k + off] &= (1UL << left) - 1; } if (off) memset(dst, 0, off*sizeof(unsigned long)); _ Patches currently in -mm which might be from linux@xxxxxxxxxxxxxxxxxx are origin.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html