OSDN Git Service

phy: mediatek: rework the floating point comparisons to fixed point
authorTom Rix <trix@redhat.com>
Tue, 2 May 2023 14:50:05 +0000 (10:50 -0400)
committerVinod Koul <vkoul@kernel.org>
Tue, 16 May 2023 14:18:06 +0000 (19:48 +0530)
commit03262a3f5b5b910c7c2900c2f8884832794355f5
treea05d1f55bd7315c1a50c36a45ca536e11c2a752b
parente42f110700ed7293700c26145e1ed07ea05ac3f6
phy: mediatek: rework the floating point comparisons to fixed point

gcc on aarch64 reports
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c: In function ‘mtk_hdmi_pll_set_rate’:
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c:240:52: error: ‘-mgeneral-regs-only’
  is incompatible with the use of floating-point types
  240 |         else if (tmds_clk >= 54 * MEGA && tmds_clk < 148.35 * MEGA)

Floating point should not be used, so rework the floating point comparisons
to fixed point.

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20230502145005.2927101-1-trix@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c