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/gt i915: Tighten asserti...



details:   https://anonhg.NetBSD.org/src/rev/d4ece6dfcbe3
branches:  trunk
changeset: 1028957:d4ece6dfcbe3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:34:50 2021 +0000

description:
i915: Tighten assertion about segment index.

diffstat:

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

diffs (27 lines):

diff -r 9d1d407f8213 -r d4ece6dfcbe3 sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c       Sun Dec 19 12:34:42 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gt/intel_ggtt.c       Sun Dec 19 12:34:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_ggtt.c,v 1.12 2021/12/19 12:26:48 riastradh Exp $        */
+/*     $NetBSD: intel_ggtt.c,v 1.13 2021/12/19 12:34:50 riastradh Exp $        */
 
 // SPDX-License-Identifier: MIT
 /*
@@ -6,7 +6,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.12 2021/12/19 12:26:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_ggtt.c,v 1.13 2021/12/19 12:34:50 riastradh Exp $");
 
 #include <linux/stop_machine.h>
 
@@ -1658,7 +1658,7 @@
 
                st->sgl->sg_dmamap->dm_nsegs = view->partial.size;
                for (i = j = 0; i < view->partial.size; j++) {
-                       KASSERT(j <= obj->mm.pages->sgl->sg_dmamap->dm_nsegs);
+                       KASSERT(j < obj->mm.pages->sgl->sg_dmamap->dm_nsegs);
                        const bus_dma_segment_t *iseg =
                            &obj->mm.pages->sgl->sg_dmamap->dm_segs[j];
 



Home | Main Index | Thread Index | Old Index