From nobody Tue Nov 26 11:46:57 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A423D2746B for ; Fri, 18 Oct 2024 15:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264222; cv=none; b=T9lKMudPkpR8fJEPJJa4bmm4EKBeKS8hN0HOjXEJVATbFwrP7Lc8LLi2fqWEOkw9DWafTUOIIysazIB/25SKGNdK1fp1tVYKTtfyzNtG3md3aH46nafioH8DbOoKqHaYitvgXTiNqP+wmkeHB/dRQneKeuPhzQyZvQlNCRDJnYg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729264222; c=relaxed/simple; bh=1PJEXr3kEPCQZZ5V+Hy5FS8SkVqvabwVcmhCAPX1iOQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=AtNCr9DchMKNS/ID9B0mbr/DrMoU4qoXQpR/B6/VQvT3ma7OCpnUMTyaZV+gTfoKRsu8taOUliJvdCF111InCYCdKzn+/KF+Z1GUAD/vjAyuglnEqc9MQ+hhnRi4VXJSrYUrY3f4c+bowbowbWbgvGUbeP2AbVOm4HltZHhU+aQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QTsLzh6l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QTsLzh6l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05FA7C4CEC3; Fri, 18 Oct 2024 15:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729264222; bh=1PJEXr3kEPCQZZ5V+Hy5FS8SkVqvabwVcmhCAPX1iOQ=; h=From:To:Cc:Subject:Date:From; b=QTsLzh6lThzlelfZBn/cIWOm1pUUnVUt4PEgpXo6zcTOjv7CgYPjb979ht52ZkEwY oYEq8dlQK+JvichsF/8JBqw1yXlpH8EngGrGEG2gb0SKoKCHRmGjtBJyd2Mxu5psRj J1hYFJaT41xlRHJH+8Sz3ibTLpBEteYzOXaz3fiIH5fs4PN1pE4XnQgeHft2pQiNkH jcz5w/I8o6EFgpHSBWzoH9wvoPcwNokJxYvYITsksrU3yFhDPiyu8bjKvdlx7oClds GEqxnMcPj5e/Pt7/k/ZlK4qtptReFNQtcQ3WuU0InCF4klTC9nNGerwH2R/8LhDdn4 +K6SEWbKYMA0Q== From: Arnd Bergmann To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Algea Cao , Cristian Ciocaltea Cc: Arnd Bergmann , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/rockchip: avoid 64-bit division Date: Fri, 18 Oct 2024 15:10:10 +0000 Message-Id: <20241018151016.3496613-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann Dividing a 64-bit integer prevents building this for 32-bit targets: ERROR: modpost: "__aeabi_uldivmod" [drivers/gpu/drm/rockchip/rockchipdrm.ko= ] undefined! As this function is not performance criticial, just Use the div_u64() helpe= r. Fixes: 128a9bf8ace2 ("drm/rockchip: Add basic RK3588 HDMI output support") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Reviewed-by: Dmitry Baryshkov Reviewed-by: Nathan Chancellor --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/d= rm/rockchip/dw_hdmi_qp-rockchip.c index 9c796ee4c303..c8b362cc2b95 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c @@ -82,7 +82,7 @@ static void dw_hdmi_qp_rockchip_encoder_enable(struct drm= _encoder *encoder) * comment in rk_hdptx_phy_power_on() from * drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c */ - phy_set_bus_width(hdmi->phy, rate / 100); + phy_set_bus_width(hdmi->phy, div_u64(rate, 100)); } } =20 --=20 2.39.5