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 Fix order of arguments t...



details:   https://anonhg.NetBSD.org/src/rev/42991133b5ef
branches:  trunk
changeset: 366312:42991133b5ef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:46:38 2018 +0000

description:
Fix order of arguments to kcopy.  @#&!$!*#

Add const qualifiers to src to compiler will detect this.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r 410879d160af -r 42991133b5ef sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Mon Aug 27 14:46:23 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c     Mon Aug 27 14:46:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_cmd_parser.c,v 1.15 2018/08/27 14:46:10 riastradh Exp $   */
+/*     $NetBSD: i915_cmd_parser.c,v 1.16 2018/08/27 14:46:38 riastradh Exp $   */
 
 /*
  * Copyright © 2013 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.15 2018/08/27 14:46:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_cmd_parser.c,v 1.16 2018/08/27 14:46:38 riastradh Exp $");
 
 #include "i915_drv.h"
 
@@ -905,7 +905,7 @@
                       u32 batch_len)
 {
        int needs_clflush = 0;
-       void *src_base, *src;
+       const void *src_base, *src;
        void *dst = NULL;
        int ret;
 
@@ -938,7 +938,7 @@
        }
        /* uvm_map consumes caller's reference on success.  */
        uao_reference(src_obj->base.filp);
-       src_base = (void *)srcva;
+       src_base = (const void *)srcva;
 #else
        src_base = vmap_batch(src_obj, batch_start_offset, batch_len);
        if (!src_base) {
@@ -979,12 +979,12 @@
        }
 #endif
 
-       src = (char *)src_base + offset_in_page(batch_start_offset);
+       src = (const char *)src_base + offset_in_page(batch_start_offset);
        if (needs_clflush)
                drm_clflush_virt_range(src, batch_len);
 
 #ifdef __NetBSD__
-       ret = -kcopy(dst, src, batch_len);
+       ret = -kcopy(src, dst, batch_len);
        if (ret) {
                uvm_unmap(kernel_map, dstva, dstva + dstlen);
                goto unmap_src;



Home | Main Index | Thread Index | Old Index