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/device Do...



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

description:
Don't pass zero to __ffs64 -- it finds zero indigestible.

diffstat:

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

diffs (27 lines):

diff -r fcde2542cc1c -r cfe5e86241f7 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_user.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_user.c       Mon Aug 27 14:17:50 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_user.c       Mon Aug 27 14:18:04 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_engine_device_user.c,v 1.4 2018/08/27 07:38:56 riastradh Exp $    */
+/*     $NetBSD: nouveau_nvkm_engine_device_user.c,v 1.5 2018/08/27 14:18:04 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_device_user.c,v 1.4 2018/08/27 07:38:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_device_user.c,v 1.5 2018/08/27 14:18:04 riastradh Exp $");
 
 #define nvkm_udevice(p) container_of((p), struct nvkm_udevice, object)
 #include "priv.h"
@@ -281,7 +281,7 @@
        const struct nvkm_device_oclass *sclass = NULL;
        int i;
 
-       for (; i = __ffs64(mask), mask && !sclass; mask &= ~(1ULL << i)) {
+       for (; mask && !sclass && (i = __ffs64(mask), 1); mask &= ~(1ULL << i)) {
                if (!(engine = nvkm_device_engine(device, i)) ||
                    !(engine->func->base.sclass))
                        continue;



Home | Main Index | Thread Index | Old Index