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/i915 No arithmetic on void *.



details:   https://anonhg.NetBSD.org/src/rev/f90b90a12d1b
branches:  trunk
changeset: 365901:f90b90a12d1b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:09:52 2018 +0000

description:
No arithmetic on void *.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_guc_submission.c |  16 +++++++-------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r dd82acce96f8 -r f90b90a12d1b sys/external/bsd/drm2/dist/drm/i915/i915_guc_submission.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_guc_submission.c Mon Aug 27 07:09:39 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_guc_submission.c Mon Aug 27 07:09:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_guc_submission.c,v 1.3 2018/08/27 07:09:39 riastradh Exp $        */
+/*     $NetBSD: i915_guc_submission.c,v 1.4 2018/08/27 07:09:52 riastradh Exp $        */
 
 /*
  * Copyright © 2014 Intel Corporation
@@ -24,7 +24,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_guc_submission.c,v 1.3 2018/08/27 07:09:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_guc_submission.c,v 1.4 2018/08/27 07:09:52 riastradh Exp $");
 
 #include <linux/firmware.h>
 #include <linux/circ_buf.h>
@@ -192,7 +192,7 @@
        void *base;
 
        base = kmap_atomic(i915_gem_object_get_page(client->client_obj, 0));
-       doorbell = base + client->doorbell_offset;
+       doorbell = (void *)((char *)base + client->doorbell_offset);
 
        doorbell->db_status = 1;
        doorbell->cookie = 0;
@@ -209,7 +209,7 @@
        int attempt = 2, ret = -EAGAIN;
 
        base = kmap_atomic(i915_gem_object_get_page(gc->client_obj, 0));
-       desc = base + gc->proc_desc_offset;
+       desc = (void *)((char *)base + gc->proc_desc_offset);
 
        /* Update the tail so it is visible to GuC */
        desc->tail = gc->wq_tail;
@@ -225,7 +225,7 @@
                db_exc.cookie = 1;
 
        /* pointer of current doorbell cacheline */
-       db = base + gc->doorbell_offset;
+       db = (void *)((char *)base + gc->doorbell_offset);
 
        while (attempt--) {
                /* lets ring the doorbell */
@@ -268,7 +268,7 @@
        int value;
 
        base = kmap_atomic(i915_gem_object_get_page(client->client_obj, 0));
-       doorbell = base + client->doorbell_offset;
+       doorbell = (void *)((char *)base + client->doorbell_offset);
 
        doorbell->db_status = 0;
 
@@ -359,7 +359,7 @@
        void *base;
 
        base = kmap_atomic(i915_gem_object_get_page(client->client_obj, 0));
-       desc = base + client->proc_desc_offset;
+       desc = (void *)((char *)base + client->proc_desc_offset);
 
        memset(desc, 0, sizeof(*desc));
 
@@ -496,7 +496,7 @@
        int ret = 0, timeout_counter = 200;
 
        base = kmap_atomic(i915_gem_object_get_page(gc->client_obj, 0));
-       desc = base + gc->proc_desc_offset;
+       desc = (void *)((char *)base + gc->proc_desc_offset);
 
        while (timeout_counter-- > 0) {
                ret = wait_for_atomic(CIRC_SPACE(gc->wq_tail, desc->head,



Home | Main Index | Thread Index | Old Index