Received: from eggs.gnu.org ([2001:4830:134:3::10]:47793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aegkM-0005c1-C4 for qemu-devel@nongnu.org; Sat, 12 Mar 2016 05:26:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aegkJ-0004rL-4L for qemu-devel@nongnu.org; Sat, 12 Mar 2016 05:26:10 -0500 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:34335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aegkI-0004rF-TQ for qemu-devel@nongnu.org; Sat, 12 Mar 2016 05:26:07 -0500 Received: by mail-pa0-x230.google.com with SMTP id fe3so102982133pab.1 for ; Sat, 12 Mar 2016 02:26:06 -0800 (PST) Received: from localhost.localdomain ([183.87.60.98]) by smtp.gmail.com with ESMTPSA id ll7sm18849756pab.6.2016.03.12.02.26.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Mar 2016 02:26:05 -0800 (PST) From: Pooja Dhannawat Date: Sat, 12 Mar 2016 15:53:05 +0530 Message-Id: <1457778185-22253-1-git-send-email-dhannawatpooja1@gmail.com> Subject: [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: qemu-devel@nongnu.org As only DEPTH ==32 case is used, removing other dead code which is based on DEPTH !== 32 Signed-off-by: Pooja Dhannawat --- hw/display/omap_lcd_template.h | 10 ++-------- hw/display/omap_lcdc.c | 21 --------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/hw/display/omap_lcd_template.h b/hw/display/omap_lcd_template.h index f0ce71f..1025ff3 100644 --- a/hw/display/omap_lcd_template.h +++ b/hw/display/omap_lcd_template.h @@ -27,13 +27,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if DEPTH == 8 -# define BPP 1 -# define PIXEL_TYPE uint8_t -#elif DEPTH == 15 || DEPTH == 16 -# define BPP 2 -# define PIXEL_TYPE uint16_t -#elif DEPTH == 32 +#if DEPTH == 32 # define BPP 4 # define PIXEL_TYPE uint32_t #else @@ -152,7 +146,7 @@ static void glue(draw_line12_, DEPTH)(void *opaque, static void glue(draw_line16_, DEPTH)(void *opaque, uint8_t *d, const uint8_t *s, int width, int deststep) { -#if DEPTH == 16 && defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) +#if defined(HOST_WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) memcpy(d, s, width * 2); #else uint16_t v; diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c index ce1058b..4b3b810 100644 --- a/hw/display/omap_lcdc.c +++ b/hw/display/omap_lcdc.c @@ -71,44 +71,23 @@ static void omap_lcd_interrupts(struct omap_lcd_panel_s *s) #define draw_line_func drawfn -#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" static draw_line_func draw_line_table2[33] = { [0 ... 32] = NULL, - [8] = draw_line2_8, - [15] = draw_line2_15, - [16] = draw_line2_16, [32] = draw_line2_32, }, draw_line_table4[33] = { [0 ... 32] = NULL, - [8] = draw_line4_8, - [15] = draw_line4_15, - [16] = draw_line4_16, [32] = draw_line4_32, }, draw_line_table8[33] = { [0 ... 32] = NULL, - [8] = draw_line8_8, - [15] = draw_line8_15, - [16] = draw_line8_16, [32] = draw_line8_32, }, draw_line_table12[33] = { [0 ... 32] = NULL, - [8] = draw_line12_8, - [15] = draw_line12_15, - [16] = draw_line12_16, [32] = draw_line12_32, }, draw_line_table16[33] = { [0 ... 32] = NULL, - [8] = draw_line16_8, - [15] = draw_line16_15, - [16] = draw_line16_16, [32] = draw_line16_32, }; -- 2.5.0