From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH v3 01/16] drm/i915: return context from i915_switch_context() Date: Sat, 20 Apr 2013 11:10:06 -0700 Message-ID: <20130420181005.GA896@bwidawsk.net> References: <1365089568-20457-1-git-send-email-mika.kuoppala@intel.com> <1365089568-20457-2-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from shiva.localdomain (unknown [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id B2223E5D4B for ; Sat, 20 Apr 2013 11:07:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1365089568-20457-2-git-send-email-mika.kuoppala@intel.com> 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: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Apr 04, 2013 at 06:32:33PM +0300, Mika Kuoppala wrote: > In preparation for the next commit, return context that > was switched to from i915_switch_context(). > > v2: context in return value instead of param. (Ben Widawsky) > > Signed-off-by: Mika Kuoppala I don't see this used in the next commit. While true that I initially wrote the patch this way, I think having functions return more than just an int is best avoided whenever possible. Furthermore, I am immediately going to change the ring->last_context_obj to ring->last_context, which should nullify the need to return the last context anyway. I already have, and can submit that patch if needed. [snip] -- Ben Widawsky, Intel Open Source Technology Center