From: Nicolas Pitre Date: Tue, 3 Nov 2015 22:01:46 +0000 (-0500) Subject: nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usage X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8cb87c0407cb55277d8b9aa50f0e29201b90a88d;p=linux-beck.git nouveau/nvkm/subdev/clk/gk20a.c: fix wrong do_div() usage do_div() must only be used with a u64 dividend. Signed-off-by: Nicolas Pitre --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c index 254094ab7fb8..5da2aa8cc333 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c @@ -141,9 +141,8 @@ gk20a_pllg_calc_rate(struct gk20a_clk *clk) rate = clk->parent_rate * clk->n; divider = clk->m * pl_to_div[clk->pl]; - do_div(rate, divider); - return rate / 2; + return rate / divider / 2; } static int