lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180615223749.149073-1-ndesaulniers@google.com>
Date:   Fri, 15 Jun 2018 15:37:49 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     thierry.reding@...il.com, airlied@...ux.ie
Cc:     Jagan Teki <jagannadh.teki@...il.com>,
        Rob Herring <robh@...nel.org>,
        Thierry Reding <treding@...dia.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/panel: simple: fix -Wliteral-conversion warning

Fixes commit 8cfe83419cdb ("drm/panel: simple: Add
support for KEO TX31D200VM0BAA")

drivers/gpu/drm/panel/panel-simple.c:1250:27: warning: implicit conversion from
      'double' to 'u32' (aka 'unsigned int') changes value from 33.5 to 33
      [-Wliteral-conversion]
        .vfront_porch = { 6, 21, 33.5 },
                        ~        ^~~~
drivers/gpu/drm/panel/panel-simple.c:1251:26: warning: implicit conversion from
      'double' to 'u32' (aka 'unsigned int') changes value from 33.5 to 33
      [-Wliteral-conversion]
        .vback_porch = { 6, 21, 33.5 },
                       ~        ^~~~

Signed-off-by: Nick Desaulniers <ndesaulniers@...gle.com>
---
Alternatively, should these be rounded up to 34?  I'm guessing the
current behaviour (truncation) is correct since that's how the patch was
operating.

 drivers/gpu/drm/panel/panel-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index cbf1ab404ee7..12bcbd1dd77b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1247,8 +1247,8 @@ static const struct display_timing koe_tx31d200vm0baa_timing = {
 	.hback_porch = { 16, 36, 56 },
 	.hsync_len = { 8, 8, 8 },
 	.vactive = { 480, 480, 480 },
-	.vfront_porch = { 6, 21, 33.5 },
-	.vback_porch = { 6, 21, 33.5 },
+	.vfront_porch = { 6, 21, 33 },
+	.vback_porch = { 6, 21, 33 },
 	.vsync_len = { 8, 8, 8 },
 	.flags = DISPLAY_FLAGS_DE_HIGH,
 };
-- 
2.18.0.rc1.244.gcf134e6275-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ