lib/bitmap: add compile-time test for __assign_bit() optimization
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Wed, 27 Mar 2024 15:23:51 +0000 (16:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Apr 2024 09:49:28 +0000 (10:49 +0100)
commit7adaf37f7f104a7ee5f150af491674ccbbfc4114
tree18ada06e6ac264606fa401f2637084cb06a4df0c
parentb44759705f7dc95d539d145b4c2edcaf079e7c33
lib/bitmap: add compile-time test for __assign_bit() optimization

Commit dc34d5036692 ("lib: test_bitmap: add compile-time
optimization/evaluations assertions") initially missed __assign_bit(),
which led to that quite a time passed before I realized it doesn't get
optimized at compilation time. Now that it does, add test for that just
to make sure nothing will break one day.
To make things more interesting, use bitmap_complement() and
bitmap_full(), thus checking their compile-time evaluation as well. And
remove the misleading comment mentioning the workaround removed recently
in favor of adding the whole file to GCov exceptions.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_bitmap.c