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/aa519a676ad0
branches: trunk
changeset: 351810:aa519a676ad0
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Feb 27 20:29:00 2017 +0000
description:
Avoid __ffs64(0).
>From maya@.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c | 12 ++++++---
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 73216977c056 -r aa519a676ad0 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Mon Feb 27 20:25:26 2017 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Mon Feb 27 20:29:00 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.5 2015/10/25 21:44:16 mrg Exp $ */
+/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.6 2017/02/27 20:29:00 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.5 2015/10/25 21:44:16 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.6 2017/02/27 20:29:00 riastradh Exp $");
#include <core/client.h>
#include <core/handle.h>
@@ -448,11 +448,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 << nvc0_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