[Intel-gfx] [PATCH 2/3] drm/i915/error: standardize function style in error capture

Chris Wilson chris at chris-wilson.co.uk
Sat Mar 3 09:54:02 UTC 2018


Quoting Michal Wajdeczko (2018-03-02 20:07:54)
> On Fri, 02 Mar 2018 20:19:29 +0100, Daniele Ceraolo Spurio  
> <daniele.ceraolospurio at intel.com> wrote:
> 
> > some of the static functions used from capture() have the "i915_"
> > prefix while other don't; most of them take i915 as a parameter, but one
> > of them derives it internally from error->i915. Let's be consistent by
> > avoiding prefix for static functions and always providing i915 as a
> > parameter.
> 
> Maybe this one static function that derived i915 from error->i915 is the
> one that did it correctly? I see no point in passing dev_priv directly
> as extra param as it is already attached to passed gpu error state.

Yeah, we'll take readability over saving an instruction or two as the
compiler should be clever enough to do the work for us... I wonder if a
flatten directive would help...
-Chris


More information about the Intel-gfx mailing list