mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-22 09:32:40 -06:00
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>
This commit is contained in:
parent
761d0f97a4
commit
7c9209e7bf
2 changed files with 3 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue