[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power of 2 |
Date: |
Thu, 05 Mar 2015 11:11:53 +0100 |
Hi,
> This patch's implementation of pow2ceil() is needlessly complicated,
> just like pow2floor() in master. Simpler:
>
> uint64_t pow2ceil2(uint64_t value)
> {
> int n = clz64(value - 1);
> return n ? 1ull << (64 - n) : 0;
> }
>
> I can rebase my patch on top of this one, and clean things up to my
> taste.
I happily accept that offer (if that's ok with peter).
cheers,
Gerd
- [Qemu-devel] [PULL 0/7] spice patch queue, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power of 2, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 1/7] qxl: document minimal video memory for new modes, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 7/7] hmp: info spice: take out webdav, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 2/7] spice: fix invalid memory access to vga.vram, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 5/7] qxl: drop update_displaychangelistener call for secondary qxl devices, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 4/7] vga: refactor vram_size clamping and rounding, Gerd Hoffmann, 2015/03/04
- [Qemu-devel] [PULL 6/7] hmp: info spice: Show string channel name, Gerd Hoffmann, 2015/03/04
- Re: [Qemu-devel] [PULL 0/7] spice patch queue, Peter Maydell, 2015/03/08