From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiUjo-000528-1o for qemu-devel@nongnu.org; Tue, 22 Mar 2016 18:25:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiUjk-0005Nz-S9 for qemu-devel@nongnu.org; Tue, 22 Mar 2016 18:25:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiUjk-0005NX-M3 for qemu-devel@nongnu.org; Tue, 22 Mar 2016 18:25:16 -0400 References: <1457778185-22253-1-git-send-email-dhannawatpooja1@gmail.com> From: Eric Blake Message-ID: <56F1C64A.2040709@redhat.com> Date: Tue, 22 Mar 2016 16:25:14 -0600 MIME-Version: 1.0 In-Reply-To: <1457778185-22253-1-git-send-email-dhannawatpooja1@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Vch2monRxFdji3wXpLfaShckTVUoBhkwx" Subject: Re: [Qemu-devel] [Patch 1/1] omap_lcdc: Remove support for DEPTH != 32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pooja Dhannawat , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Vch2monRxFdji3wXpLfaShckTVUoBhkwx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/12/2016 03:23 AM, Pooja Dhannawat wrote: > As only DEPTH =3D=3D32 case is used, removing other dead code > which is based on DEPTH !=3D=3D 32 >=20 > Signed-off-by: Pooja Dhannawat > --- > +++ b/hw/display/omap_lcdc.c > @@ -71,44 +71,23 @@ static void omap_lcd_interrupts(struct omap_lcd_pan= el_s *s) > =20 > #define draw_line_func drawfn > =20 > -#define DEPTH 8 > -#include "omap_lcd_template.h" > -#define DEPTH 15 > -#include "omap_lcd_template.h" > -#define DEPTH 16 > -#include "omap_lcd_template.h" > #define DEPTH 32 > #include "omap_lcd_template.h" Umm, the old code WAS using DEPTH !=3D 32. I'm not a display expert, so there may be justification in nuking that code; but the commit message needs a better argument than "the code wasn't used" when it sure seems to be used. If the argument is that surface_bits_per_pixel() always returns 32, that would be a good argument. > =20 > static draw_line_func draw_line_table2[33] =3D { > [0 ... 32] =3D NULL, > - [8] =3D draw_line2_8, > - [15] =3D draw_line2_15, > - [16] =3D draw_line2_16, > [32] =3D draw_line2_32, This array is now wasteful. If surface_bits_per_pixel() always returns 32, then just ditch this array, and later on, change: /* Colour depth */ switch ((omap_lcd->palette[0] >> 12) & 7) { case 1: - draw_line =3D draw_line_table2[surface_bits_per_pixel(surface)]; + draw_line =3D draw_line2_32; bpp =3D 2; break; In other words, your cleanup, if justified, is incomplete. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Vch2monRxFdji3wXpLfaShckTVUoBhkwx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW8cZKAAoJEKeha0olJ0NqqN0H/jKbYGk37V+GpvegZM7gz9Av qJ9mlhGcv1CkzEroDRUtj9sbZs6y5JSqM0/7GisEqqhzOmnQF+In9T3oT4yUxm3P F2JtKv1vo2CJLBroGR7niaurfnWkrRvnDb27VReVu/pv9C8FVzyPEEfp46FF68il PQaKciR5RPq36PmHbigpkhuXYaRDhkElr0sV0TzBOipWzIeXoseMNa02ADzWxdzA B9XsI5jpANJOMvHjMJ7px02NZ4FpV4sENi+X/lkOQHXzK5+ePVyVRqX57Y+gNb6n FVRm31MIMtAzgIMhRQCVUIjPnMIqbRi+zKOvI7ApQvCuiZNxPtuwFM2lIHABSHo= =dBtO -----END PGP SIGNATURE----- --Vch2monRxFdji3wXpLfaShckTVUoBhkwx--