]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: davinci: Fix implicit enum conversion warning
authorNathan Chancellor <natechancellor@gmail.com>
Sat, 15 Sep 2018 06:16:15 +0000 (02:16 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:47 +0000 (13:16 +0100)
BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 4158757395b300b6eb308fc20b96d1d231484413 ]

Clang warns when one enumerated type is implicitly converted to another.

drivers/media/platform/davinci/vpbe_display.c:524:24: warning: implicit
conversion from enumeration type 'enum osd_v_exp_ratio' to different
enumeration type 'enum osd_h_exp_ratio' [-Wenum-conversion]
                        layer_info->h_exp = V_EXP_6_OVER_5;
                                          ~ ^~~~~~~~~~~~~~
1 warning generated.

This appears to be a copy and paste error judging from the couple of
lines directly above this statement and the way that height is handled
in the if block above this one.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/davinci/vpbe_display.c

index 6aabd21fe69f3e2771711f09581577b147105488..a2e8779c318596aa397d063b5db15185bfaa19a8 100644 (file)
@@ -518,7 +518,7 @@ vpbe_disp_calculate_scale_factor(struct vpbe_display *disp_dev,
                else if (v_scale == 4)
                        layer_info->v_zoom = ZOOM_X4;
                if (v_exp)
-                       layer_info->h_exp = V_EXP_6_OVER_5;
+                       layer_info->v_exp = V_EXP_6_OVER_5;
        } else {
                /* no scaling, only cropping. Set display area to crop area */
                cfg->ysize = expected_ysize;