[Intel-gfx] [PATCH 4/8] drm/i915/uc: Rename intel_?uc_init() to intel_?uc_fetch_fw()

Michal Wajdeczko michal.wajdeczko at intel.com
Fri Feb 17 13:31:09 UTC 2017


On Fri, Feb 17, 2017 at 02:05:53PM +0100, Arkadiusz Hiler wrote:
> Trying to have subject_verb_object ordering and more descriptive names,
> the intel_huc_init() and intel_guc_init() functions are renamed:
> 
>  * `intel_guc` is the subject, so those functions now take intel_guc
>    structure, instead of the dev_priv
>  * fetch is the verb
>  * fw is the object which better describes the function's role
> 
> Same change is done for the huc counterpart.
> 
> Also we bulk call both functions from higher-level intel_fetch_uc_fw:
>  * intel being the subject (taking the dev_priv as param)
>  * fetch being the verb
>  * uc_fw being the subject
> 
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
> ---

<SNIP>

> diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
> index 41b7351..19b8966 100644
> --- a/drivers/gpu/drm/i915/intel_uc.h
> +++ b/drivers/gpu/drm/i915/intel_uc.h
> @@ -185,11 +185,12 @@ struct intel_huc {
>  
>  /* intel_uc.c */
>  void intel_uc_init_early(struct drm_i915_private *dev_priv);
> +void intel_fetch_uc_fw(struct drm_i915_private *dev_priv);

Hmm, names of these two functions above are inconsistent now.
Maybe they both should start with i915 as they take dev_priv:

	void i915_uc_init_early(struct drm_i915_private *dev_priv);
	void i915_uc_fetch_fw(struct drm_i915_private *dev_priv);

or treat intel_uc as a subject:

	void intel_uc_init_early(struct drm_i915_private *dev_priv);
	void intel_uc_fetch_fw(struct drm_i915_private *dev_priv);


-Michal 



More information about the Intel-gfx mailing list