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: <20250307092113.646831-1-dmitry.osipenko@collabora.com>
Date: Fri,  7 Mar 2025 12:21:13 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Shreeya Patel <shreeya.patel@...labora.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>,
	jose.abreu@...opsys.com,
	nelson.costa@...opsys.com,
	shawn.wen@...k-chips.com,
	nicolas.dufresne@...labora.com,
	Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: kernel@...labora.com,
	linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-rockchip@...ts.infradead.org,
	Tim Surber <me@...surber.de>
Subject: [PATCH v1] media: platform: synopsys: hdmirx: Fix compilation on 32bit arches

The pixelclock is specified as 64bit integer and for this driver it
won't be above 600MHz. Fix the 64bit division of the pixclock for 32bit
kernel builds.

Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503070743.WnRxStlk-lkp@intel.com/
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
---
 drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
index 4d42da7255f3..7e342bbde967 100644
--- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -291,7 +291,7 @@ static void hdmirx_get_timings(struct snps_hdmirx_dev *hdmirx_dev,
 	hfp = htotal - hact - hs - hbp;
 	vfp = vtotal - vact - vs - vbp;
 
-	fps = (bt->pixelclock + (htotal * vtotal) / 2) / (htotal * vtotal);
+	fps = ((u32)bt->pixelclock + (htotal * vtotal) / 2) / (htotal * vtotal);
 	bt->width = hact;
 	bt->height = vact;
 	bt->hfrontporch = hfp;
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ