summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2017-03-13 15:33:25 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-05-12 12:36:02 +0200
commit7c9209e7bfb8c09ab5a4cadaa84928d146874a05 (patch)
tree4d12e40a2895ca68ca8c16909765b71e645249ec /include
parent761d0f97a40a3a6b6a0f2fb75eea47a0cea42d14 (diff)
downloadqemu-7c9209e7bfb8c09ab5a4cadaa84928d146874a05.tar.gz
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')
-rw-r--r--include/qemu/bitops.h10
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