On Mon, Dec 29, 2025 at 01:54:45PM +0200, Jani Nikula wrote:
> The i915_utils.h and intel_display_utils.h were in some cases included
> from the same files, the former via i915_drv.h and the latter
> directly. This lead to a clash between MISSING_CASE() and
> fetch_and_zero() defined in both, requiring ifdefs.
> 
> With the display dependency on i915_drv.h removed, we can also remove
> the now unnecessary ifdefs.
> 
> Signed-off-by: Jani Nikula <[email protected]>

Reviewed-by: Matt Roper <[email protected]>

> ---
>  drivers/gpu/drm/i915/display/intel_display_utils.h | 4 ----
>  drivers/gpu/drm/i915/i915_utils.h                  | 4 ----
>  2 files changed, 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_utils.h 
> b/drivers/gpu/drm/i915/display/intel_display_utils.h
> index 2a18f160320c..affa3179f52c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_utils.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_utils.h
> @@ -9,18 +9,14 @@
>  
>  struct intel_display;
>  
> -#ifndef MISSING_CASE
>  #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
>                            __stringify(x), (long)(x))
> -#endif
>  
> -#ifndef fetch_and_zero
>  #define fetch_and_zero(ptr) ({                                               
> \
>       typeof(*ptr) __T = *(ptr);                                      \
>       *(ptr) = (typeof(*ptr))0;                                       \
>       __T;                                                            \
>  })
> -#endif
>  
>  #define KHz(x) (1000 * (x))
>  #define MHz(x) KHz(1000 * (x))
> diff --git a/drivers/gpu/drm/i915/i915_utils.h 
> b/drivers/gpu/drm/i915/i915_utils.h
> index 9e5b7fcadbe2..ecc20e0528f4 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -38,22 +38,18 @@
>  
>  struct drm_i915_private;
>  
> -#ifndef MISSING_CASE
>  #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
>                            __stringify(x), (long)(x))
> -#endif
>  
>  #define i915_probe_error(i915, fmt, ...) ({ \
>       drm_err(&(i915)->drm, fmt, ##__VA_ARGS__); \
>  })
>  
> -#ifndef fetch_and_zero
>  #define fetch_and_zero(ptr) ({                                               
> \
>       typeof(*ptr) __T = *(ptr);                                      \
>       *(ptr) = (typeof(*ptr))0;                                       \
>       __T;                                                            \
>  })
> -#endif
>  
>  /*
>   * check_user_mbz: Check that a user value exists and is zero
> -- 
> 2.47.3
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

Reply via email to