Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/utils: drop unnecessary ifdefs

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.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/f40a1fd365cbcfb77bd76ce0041c4523699f6052.1767009044.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

-8
-4
drivers/gpu/drm/i915/display/intel_display_utils.h
··· 9 9 10 10 struct intel_display; 11 11 12 - #ifndef MISSING_CASE 13 12 #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \ 14 13 __stringify(x), (long)(x)) 15 - #endif 16 14 17 - #ifndef fetch_and_zero 18 15 #define fetch_and_zero(ptr) ({ \ 19 16 typeof(*ptr) __T = *(ptr); \ 20 17 *(ptr) = (typeof(*ptr))0; \ 21 18 __T; \ 22 19 }) 23 - #endif 24 20 25 21 #define KHz(x) (1000 * (x)) 26 22 #define MHz(x) KHz(1000 * (x))
-4
drivers/gpu/drm/i915/i915_utils.h
··· 38 38 39 39 struct drm_i915_private; 40 40 41 - #ifndef MISSING_CASE 42 41 #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \ 43 42 __stringify(x), (long)(x)) 44 - #endif 45 43 46 44 #define i915_probe_error(i915, fmt, ...) ({ \ 47 45 drm_err(&(i915)->drm, fmt, ##__VA_ARGS__); \ 48 46 }) 49 47 50 - #ifndef fetch_and_zero 51 48 #define fetch_and_zero(ptr) ({ \ 52 49 typeof(*ptr) __T = *(ptr); \ 53 50 *(ptr) = (typeof(*ptr))0; \ 54 51 __T; \ 55 52 }) 56 - #endif 57 53 58 54 /* 59 55 * check_user_mbz: Check that a user value exists and is zero