From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 02/29] drm/i915: Rework drop caches for checkpatch Date: Sat, 3 Aug 2013 12:32:35 +0100 Message-ID: <20130803113235.GF4878@cantiga.alporthouse.com> References: <1375315222-4785-1-git-send-email-ben@bwidawsk.net> <1375315222-4785-3-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BF08E67E5 for ; Sat, 3 Aug 2013 04:32:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1375315222-4785-3-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 31, 2013 at 04:59:55PM -0700, Ben Widawsky wrote: > With an upcoming change to bind, to make checkpatch happy and keep the > code clean, we need to rework this code a bit. > > This should have no functional impact. > > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_debugfs.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index be69807..61ffa71 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1781,12 +1781,13 @@ i915_drop_caches_set(void *data, u64 val) > > if (val & DROP_BOUND) { > list_for_each_entry_safe(obj, next, &vm->inactive_list, > - mm_list) > - if (obj->pin_count == 0) { > - ret = i915_gem_object_unbind(obj); > - if (ret) > - goto unlock; > - } > + mm_list) { > + if (obj->pin_count) > + continue; Give me a newline here, and I'm sold. > + ret = i915_gem_object_unbind(obj); > + if (ret) > + goto unlock; > + } > } -- Chris Wilson, Intel Open Source Technology Centre