From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aziPj-0006jv-Nd for qemu-devel@nongnu.org; Mon, 09 May 2016 06:27:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aziPi-00025R-PG for qemu-devel@nongnu.org; Mon, 09 May 2016 06:27:47 -0400 References: <1461235306-3393-1-git-send-email-sylvain@sylvaingarrigues.com> <19E314DF-2836-4020-94F1-4D1B39CD6E6C@sylvaingarrigues.com> From: Paolo Bonzini Message-ID: <57306626.6050702@redhat.com> Date: Mon, 9 May 2016 12:27:50 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] bcm2835_property: use cached values when querying framebuffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Baumann , Sylvain Garrigues Cc: Peter Maydell , Eric Blake , Markus Armbruster , "qemu-arm@nongnu.org" , "qemu-devel@nongnu.org" On 22/04/2016 13:30, Andrew Baumann wrote: >> From: Sylvain Garrigues [mailto:sylvain@sylvaingarrigues.com] >> Sent: Friday, 22 April 2016 13:27 >> >> Le 22 avr. 2016 =C3=A0 13:22, Andrew Baumann >> a =C3=A9crit : >>>> + stl_le_phys(&s->dma_as, value + 16, tmp_xres * tmp_yres >>>> + * (tmp_bpp >> 3)); >>> >>> Personal style nit: I prefer * 8 rather than >> 3, because it's more = immediately >> obvious what you're computing, a trivial optimisation for the compiler Note that it's only trivial for unsigned dividend. A signed dividend has >> rounding towards -infinity and / rounding towards zero. Paolo