Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/riastradh-drm2]: src/sys/external/bsd/drm2/dist/drm Avoid arithmetic on ...



details:   https://anonhg.NetBSD.org/src/rev/9ab542b0b7b2
branches:  riastradh-drm2
changeset: 788069:9ab542b0b7b2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 02:05:17 2013 +0000

description:
Avoid arithmetic on void * in drm_bufs.c.

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_bufs.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 3408a9e1134f -r 9ab542b0b7b2 sys/external/bsd/drm2/dist/drm/drm_bufs.c
--- a/sys/external/bsd/drm2/dist/drm/drm_bufs.c Wed Jul 24 02:05:01 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_bufs.c Wed Jul 24 02:05:17 2013 +0000
@@ -898,7 +898,11 @@
                        buf->order = order;
                        buf->used = 0;
                        buf->offset = (dma->byte_count + byte_count + offset);
+#ifdef __NetBSD__
+                       buf->address = (void *)((char *)dmah->vaddr + offset);
+#else
                        buf->address = (void *)(dmah->vaddr + offset);
+#endif
                        buf->bus_address = dmah->busaddr + offset;
                        buf->next = NULL;
                        buf->waiting = 0;



Home | Main Index | Thread Index | Old Index