[PATCH 5/7] drm/nv50/pm: signedness bug in nv50_pm_clocks_pre()
Dan Carpenter
dan.carpenter at oracle.com
Tue Jan 3 23:20:47 PST 2012
calc_mclk() returns zero on success and negative on failure but clk is
a u32.
v2: Martin Peres:
- clk should be an int, not a u32
Signed-off-by: Martin Peres <martin.peres at labri.fr>
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
drivers/gpu/drm/nouveau/nv50_pm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c
index 983b432..4be2e20 100644
--- a/drivers/gpu/drm/nouveau/nv50_pm.c
+++ b/drivers/gpu/drm/nouveau/nv50_pm.c
@@ -659,11 +659,11 @@ nv50_pm_clocks_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl)
struct nv50_pm_state *info;
struct hwsq_ucode *hwsq;
struct pll_lims pll;
- int ret = -EINVAL;
+ int clk, ret = -EINVAL;
int N, M, P1, P2;
u32 mast = nv_rd32(dev, 0x00c040);
u32 divs = read_div(dev);
- u32 ctrl, clk, out;
+ u32 ctrl, out;
if (dev_priv->chipset == 0xaa ||
dev_priv->chipset == 0xac)
--
1.7.8.1
--------------010709090008070107000009--
More information about the dri-devel
mailing list