Module Name: src
Committed By: riastradh
Date: Mon Aug 27 07:37:48 UTC 2018
Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvif: nouveau_nvif_notify.c
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core:
nouveau_nvkm_core_notify.c
Log Message:
Sprinkle __UNCONST judiciously.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c:1.2 src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c:1.2 Mon Aug 27 04:58:30 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_notify.c Mon Aug 27 07:37:47 2018
@@ -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 @@ nvif_notify(const void *header, u32 leng
if (!WARN_ON(notify->size != size)) {
atomic_inc(¬ify->putcnt);
if (test_bit(NVIF_NOTIFY_WORK, ¬ify->flags)) {
- memcpy((void *)notify->data, data, size);
+ memcpy(__UNCONST(notify->data), data, size);
schedule_work(¬ify->work);
return NVIF_NOTIFY_DROP;
}
@@ -162,7 +162,7 @@ nvif_notify_fini(struct nvif_notify *not
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;
Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c:1.2 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c:1.3
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c:1.2 Mon Aug 27 04:58:30 2018
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_notify.c Mon Aug 27 07:37:47 2018
@@ -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 <[email protected]>
*/
#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 @@ nvkm_notify_send(struct nvkm_notify *not
spin_unlock_irqrestore(&event->refs_lock, flags);
if (test_bit(NVKM_NOTIFY_WORK, ¬ify->flags)) {
- memcpy((void *)notify->data, data, size);
+ memcpy(__UNCONST(notify->data), data, size);
schedule_work(¬ify->work);
} else {
notify->data = data;
@@ -128,7 +128,7 @@ nvkm_notify_fini(struct nvkm_notify *not
spin_lock_irqsave(¬ify->event->list_lock, flags);
list_del(¬ify->head);
spin_unlock_irqrestore(¬ify->event->list_lock, flags);
- kfree((void *)notify->data);
+ kfree(__UNCONST(notify->data));
notify->event = NULL;
}
}