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/engine/fifo Anot...



details:   https://anonhg.NetBSD.org/src/rev/2fcbc7fdb3be
branches:  trunk
changeset: 992967:2fcbc7fdb3be
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:18:43 2018 +0000

description:
Another zero __ffs64 bug.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6e7eadd8aa2d -r 2fcbc7fdb3be sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c   Mon Aug 27 14:18:30 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_chan.c   Mon Aug 27 14:18:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.4 2018/08/27 07:39:56 riastradh Exp $      */
+/*     $NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.5 2018/08/27 14:18:43 riastradh Exp $      */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.4 2018/08/27 07:39:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_fifo_chan.c,v 1.5 2018/08/27 14:18:43 riastradh Exp $");
 
 #include "chan.h"
 
@@ -213,7 +213,7 @@
        u64 mask = chan->engines;
        int ret, i, c;
 
-       for (; c = 0, i = __ffs64(mask), mask; mask &= ~(1ULL << i)) {
+       for (; c = 0, mask && (i = __ffs64(mask), 1); mask &= ~(1ULL << i)) {
                if (!(engine = nvkm_device_engine(device, i)))
                        continue;
                oclass->engine = engine;



Home | Main Index | Thread Index | Old Index