Re: [PATCH v2 09/10] drm/i915/display: convert dp_to_i915() to a macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 01, 2021 at 03:57:11PM +0200, Jani Nikula wrote:
> Avoid looking into the guts of struct drm_i915_private in
> headers. Again, converting an inline function to a macro is less than
> ideal, but avoids having to pull in i915_drv.h just for the to_i915()
> part.

Ugly, but gets the job done.

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 14b4c3bb6030..f6e76b4d377d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1883,11 +1883,7 @@ dp_to_lspcon(struct intel_dp *intel_dp)
>  	return &dp_to_dig_port(intel_dp)->lspcon;
>  }
>  
> -static inline struct drm_i915_private *
> -dp_to_i915(struct intel_dp *intel_dp)
> -{
> -	return to_i915(dp_to_dig_port(intel_dp)->base.base.dev);
> -}
> +#define dp_to_i915(__intel_dp) to_i915(dp_to_dig_port(__intel_dp)->base.base.dev)
>  
>  #define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
>  			   (intel_dp)->psr.source_support)
> -- 
> 2.30.2

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux