X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Ftest_bitmap.c;h=6b13150667f50f087570c69ce8c646850c5e6f43;hb=15770370df4d51bd5ca408f0b8c46c90098d3300;hp=61ed71c1daba9776dff638e3f01034dfae7342ea;hpb=30fe0d07fd7b27d41d9b31a224052cc4e910947a;p=linux-2.6-block.git diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 61ed71c1daba..6b13150667f5 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -278,6 +278,8 @@ static void __init test_replace(void) unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); DECLARE_BITMAP(bmap, 1024); + BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); + bitmap_zero(bmap, 1024); bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); expect_eq_bitmap(bmap, exp3_0_1, nbits);