From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTSl3-0006je-5m for qemu-devel@nongnu.org; Thu, 05 Mar 2015 05:11:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTSl2-0002D8-FT for qemu-devel@nongnu.org; Thu, 05 Mar 2015 05:11:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTSl2-0002D0-7y for qemu-devel@nongnu.org; Thu, 05 Mar 2015 05:11:56 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t25ABtit006621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Mar 2015 05:11:55 -0500 Message-ID: <1425550313.12745.46.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Thu, 05 Mar 2015 11:11:53 +0100 In-Reply-To: <87twxzai0i.fsf@blackfin.pond.sub.org> References: <1425479449-11480-1-git-send-email-kraxel@redhat.com> <1425479449-11480-4-git-send-email-kraxel@redhat.com> <87twxzai0i.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 3/7] qxl: refactor rounding up to a nearest power of 2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= 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