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 Sprinkle __UNCONST ju...



details:   https://anonhg.NetBSD.org/src/rev/1c5cf3708341
branches:  trunk
changeset: 366033:1c5cf3708341
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:37:47 2018 +0000

description:
Sprinkle __UNCONST judiciously.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c           |  8 ++++----
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 196e837f1e5c -r 1c5cf3708341 sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c Mon Aug 27 07:37:38 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c Mon Aug 27 07:37:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvif_notify.c,v 1.2 2018/08/27 04:58:30 riastradh Exp $        */
+/*     $NetBSD: nouveau_nvif_notify.c,v 1.3 2018/08/27 07:37:47 riastradh Exp $        */
 
 /*
  * Copyright 2014 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif_notify.c,v 1.2 2018/08/27 04:58:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif_notify.c,v 1.3 2018/08/27 07:37:47 riastradh Exp $");
 
 #include <nvif/client.h>
 #include <nvif/driver.h>
@@ -133,7 +133,7 @@
                if (!WARN_ON(notify->size != size)) {
                        atomic_inc(&notify->putcnt);
                        if (test_bit(NVIF_NOTIFY_WORK, &notify->flags)) {
-                               memcpy((void *)notify->data, data, size);
+                               memcpy(__UNCONST(notify->data), data, size);
                                schedule_work(&notify->work);
                                return NVIF_NOTIFY_DROP;
                        }
@@ -162,7 +162,7 @@
                ret = nvif_object_ioctl(object, &args, sizeof(args), NULL);
                if (ret == 0) {
                        notify->object = NULL;
-                       kfree((void *)notify->data);
+                       kfree(__UNCONST(notify->data));
                }
        }
        return ret;
diff -r 196e837f1e5c -r 1c5cf3708341 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c       Mon Aug 27 07:37:38 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c       Mon Aug 27 07:37:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_core_notify.c,v 1.2 2018/08/27 04:58:30 riastradh Exp $   */
+/*     $NetBSD: nouveau_nvkm_core_notify.c,v 1.3 2018/08/27 07:37:47 riastradh Exp $   */
 
 /*
  * Copyright 2014 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs <bskeggs%redhat.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_notify.c,v 1.2 2018/08/27 04:58:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_notify.c,v 1.3 2018/08/27 07:37:47 riastradh Exp $");
 
 #include <core/notify.h>
 #include <core/event.h>
@@ -110,7 +110,7 @@
        spin_unlock_irqrestore(&event->refs_lock, flags);
 
        if (test_bit(NVKM_NOTIFY_WORK, &notify->flags)) {
-               memcpy((void *)notify->data, data, size);
+               memcpy(__UNCONST(notify->data), data, size);
                schedule_work(&notify->work);
        } else {
                notify->data = data;
@@ -128,7 +128,7 @@
                spin_lock_irqsave(&notify->event->list_lock, flags);
                list_del(&notify->head);
                spin_unlock_irqrestore(&notify->event->list_lock, flags);
-               kfree((void *)notify->data);
+               kfree(__UNCONST(notify->data));
                notify->event = NULL;
        }
 }



Home | Main Index | Thread Index | Old Index