[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1426627377-30737-1-git-send-email-bobby.prani@gmail.com>
Date: Tue, 17 Mar 2015 17:22:52 -0400
From: Pranith Kumar <bobby.prani@...il.com>
To: David Airlie <airlied@...ux.ie>, Ben Skeggs <bskeggs@...hat.com>,
Roy Spliet <rspliet@...ipso.eu>,
Ilia Mirkin <imirkin@...m.mit.edu>,
Alexandre Courbot <acourbot@...dia.com>,
dri-devel@...ts.freedesktop.org (open list:DRM DRIVERS),
linux-kernel@...r.kernel.org (open list)
Cc: stable@...r.kernel.org
Subject: [PATCH] nouveau: gt215: Fix clock freq. calculation
In commit 6a4a47cfd181 ("drm/nva3/clk: Set PLL refclk") diff was changed from
int to u32 because of which a later branch which was testing if (diff < 0)
became always false. Fix this by using int type for diff.
Signed-off-by: Pranith Kumar <bobby.prani@...il.com>
CC: stable@...r.kernel.org
CC: Roy Spliet <rspliet@...ipso.eu>
CC: Ben Skeggs <bskeggs@...hat.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
index 822d32a..db37db3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c
@@ -180,7 +180,8 @@ gt215_clk_info(struct nvkm_clk *clock, int clk, u32 khz,
struct gt215_clk_info *info)
{
struct gt215_clk_priv *priv = (void *)clock;
- u32 oclk, sclk, sdiv, diff;
+ u32 oclk, sclk, sdiv;
+ int diff;
info->clk = 0;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists