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/core/engine/fifo Avoi...
details: https://anonhg.NetBSD.org/src/rev/5bbc92e87c17
branches: trunk
changeset: 351806:5bbc92e87c17
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Feb 27 18:28:39 2017 +0000
description:
Avoid __ffs64(0).
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c | 12 ++++++---
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 1d895f05e983 -r 5bbc92e87c17 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Mon Feb 27 16:16:23 2017 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Mon Feb 27 18:28:39 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.6 2015/10/26 07:12:08 mrg Exp $ */
+/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.7 2017/02/27 18:28:39 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.6 2015/10/26 07:12:08 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.7 2017/02/27 18:28:39 riastradh Exp $");
#include <core/client.h>
#include <core/handle.h>
@@ -476,11 +476,15 @@
priv->mask = 0ULL;
spin_unlock_irqrestore(&priv->base.lock, flags);
- for (todo = mask; engn = __ffs64(todo), todo; todo &= ~(1 << engn))
+ for (todo = mask;
+ todo && (engn = __ffs64(todo), 1);
+ todo &= ~(1 << engn))
engm |= 1 << nve0_fifo_engidx(priv, engn);
nv_mask(priv, 0x002630, engm, engm);
- for (todo = mask; engn = __ffs64(todo), todo; todo &= ~(1 << engn)) {
+ for (todo = mask;
+ todo && (engn = __ffs64(todo), 1);
+ todo &= ~(1 << engn)) {
if ((engine = (void *)nouveau_engine(priv, engn))) {
nv_ofuncs(engine)->fini(engine, false);
WARN_ON(nv_ofuncs(engine)->init(engine));
Home |
Main Index |
Thread Index |
Old Index