From c2f6f798739f1aa62635f491a73fbe12f97d3999 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 7 Nov 2013 05:33:06 +0000 Subject: add a simplistic version of WARN_ON_ONCE() that doesn't warn reduces the diff to linux and avoids a clang warning brad mentioned ok kettenis@ brad@ --- sys/dev/pci/drm/i915/i915_gem_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/drm/i915/i915_gem_context.c') diff --git a/sys/dev/pci/drm/i915/i915_gem_context.c b/sys/dev/pci/drm/i915/i915_gem_context.c index 2323b4512b4..0290d072dca 100644 --- a/sys/dev/pci/drm/i915/i915_gem_context.c +++ b/sys/dev/pci/drm/i915/i915_gem_context.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem_context.c,v 1.2 2013/10/05 07:30:06 jsg Exp $ */ +/* $OpenBSD: i915_gem_context.c,v 1.3 2013/11/07 05:33:05 jsg Exp $ */ /* * Copyright © 2011-2012 Intel Corporation * @@ -422,7 +422,7 @@ static int do_switch(struct i915_hw_context *to) if (!to->is_initialized || is_default_context(to)) hw_flags |= MI_RESTORE_INHIBIT; - else if (/*WARN_ON_ONCE*/(from_obj == to->obj)) /* not yet expected */ + else if (WARN_ON_ONCE(from_obj == to->obj)) /* not yet expected */ hw_flags |= MI_FORCE_RESTORE; ret = mi_set_context(ring, to, hw_flags); -- cgit v1.2.3