]> git.ipfire.org Git - thirdparty/linux.git/commit - lib/bitmap.c
bitmap: Introduce bitmap_cut(): cut bits and shift remaining
authorStefano Brivio <sbrivio@redhat.com>
Tue, 21 Jan 2020 23:17:54 +0000 (00:17 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 27 Jan 2020 07:54:30 +0000 (08:54 +0100)
commit2092767168f0681aa03727448b801600a364c013
tree07fa49e6476d91c6a9b453ec740039ebe8eb9a80
parentf3a2181e16f1dcbf5446ed43f6b5d9f56c459f85
bitmap: Introduce bitmap_cut(): cut bits and shift remaining

The new bitmap function bitmap_cut() copies bits from source to
destination by removing the region specified by parameters first
and cut, and remapping the bits above the cut region by right
shifting them.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/bitmap.h
lib/bitmap.c