Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk remov...
details: https://anonhg.NetBSD.org/src/rev/c849e0041b6d
branches: trunk
changeset: 449012:c849e0041b6d
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 18 23:19:36 2019 +0000
description:
remove multiplication as condition complaint
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_gt215.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 7a3a5c30ecc4 -r c849e0041b6d sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_gt215.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_gt215.c Mon Feb 18 23:13:14 2019 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/clk/nouveau_nvkm_subdev_clk_gt215.c Mon Feb 18 23:19:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_clk_gt215.c,v 1.3 2018/08/27 07:38:56 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_clk_gt215.c,v 1.4 2019/02/18 23:19:36 christos Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
* Roy Spliet
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_clk_gt215.c,v 1.3 2018/08/27 07:38:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_clk_gt215.c,v 1.4 2019/02/18 23:19:36 christos Exp $");
#define gt215_clk(p) container_of((p), struct gt215_clk, base)
#include "gt215.h"
@@ -135,8 +135,9 @@
sclk = read_clk(clk, 0x10 + idx, false);
}
- if (M * P)
- return sclk * N / (M * P);
+ u32 mp = M * P;
+ if (mp != 0)
+ return sclk * N / mp;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index