Skip to content

Commit b204c29

Browse files
SomeRandomToasterhdeller
authored andcommitted
fbdev: omapfb: Remove writeback deadcode
Value of enum parameter 'plane' is initialized in dss_init_overlays and cannot take the value OMAP_DSS_WB. Function dispc_ovl_setup_common could be called with this value of parameter only from dispc_wb_setup, which has never been used and has been removed in commit 4f55bb0 ("omapfb: Remove unused writeback code"). The code in the if-branch is unreachable. Remove unreachable branch. Found by Linux Verification Center (linuxtesting.org) with SVACE static analysis tool. Signed-off-by: Leonid Arapov <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 4afd637 commit b204c29

File tree

1 file changed

+2
-7
lines changed
  • drivers/video/fbdev/omap2/omapfb/dss

1 file changed

+2
-7
lines changed

drivers/video/fbdev/omap2/omapfb/dss/dispc.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,13 +2659,8 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
26592659
row_inc = 0;
26602660
pix_inc = 0;
26612661

2662-
if (plane == OMAP_DSS_WB) {
2663-
frame_width = out_width;
2664-
frame_height = out_height;
2665-
} else {
2666-
frame_width = in_width;
2667-
frame_height = height;
2668-
}
2662+
frame_width = in_width;
2663+
frame_height = height;
26692664

26702665
if (rotation_type == OMAP_DSS_ROT_TILER)
26712666
calc_tiler_rotation_offset(screen_width, frame_width,

0 commit comments

Comments
 (0)