diff options
author | Cédric Le Goater | 2017-03-13 15:33:25 +0100 |
---|---|---|
committer | Gerd Hoffmann | 2017-05-12 12:36:02 +0200 |
commit | 7c9209e7bfb8c09ab5a4cadaa84928d146874a05 (patch) | |
tree | 4d12e40a2895ca68ca8c16909765b71e645249ec /include/qemu/bitops.h | |
parent | vnc: simple clean up (diff) | |
download | qemu-7c9209e7bfb8c09ab5a4cadaa84928d146874a05.tar.gz qemu-7c9209e7bfb8c09ab5a4cadaa84928d146874a05.tar.xz qemu-7c9209e7bfb8c09ab5a4cadaa84928d146874a05.zip |
vnc: replace hweight_long() with ctpopl()
ctpopl() has a better implementation than hweight_long() and ui/vnc.c
being the last user of hweight_long(), we can simply remove it.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1489415605-13105-1-git-send-email-clg@kaod.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/qemu/bitops.h')
-rw-r--r-- | include/qemu/bitops.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 1881284cb5..3f0926cf40 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -201,16 +201,6 @@ static inline unsigned long find_first_zero_bit(const unsigned long *addr, return find_next_zero_bit(addr, size, 0); } -static inline unsigned long hweight_long(unsigned long w) -{ - unsigned long count; - - for (count = 0; w; w >>= 1) { - count += w & 1; - } - return count; -} - /** * rol8 - rotate an 8-bit value left * @word: value to rotate |