diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-03-28 12:24:55 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-04-02 10:53:59 +0300 |
commit | 2d2d92bc2583cbfbe4d156f5fdf6c49789c94a6f (patch) | |
tree | d76b25983eee4f8888d2a1e38bc642f10e7a663d /drivers/gpu/drm/i915/display/intel_display_device.c | |
parent | 5a1da42b50f3594e18738885c2f23ed36629dd00 (diff) | |
download | linux-stable-2d2d92bc2583cbfbe4d156f5fdf6c49789c94a6f.tar.gz linux-stable-2d2d92bc2583cbfbe4d156f5fdf6c49789c94a6f.tar.bz2 linux-stable-2d2d92bc2583cbfbe4d156f5fdf6c49789c94a6f.zip |
drm/i915: use fine grained -Woverride-init disable
Use localized __diag_push(), __diag_ignore_all() with rationale, and
__diag_pop() for specific initializations instead of blanket disabling
of -Woverride-init across several files.
Note that we've tried this before with commit 88e9664434c9 ("drm/i915:
use localized __diag_ignore_all() instead of per file") and reverted in
commit 290d16104575 ("Revert "drm/i915: use localized
__diag_ignore_all() instead of per file""). The issue turned out to be
in __diag_ignore_all() and it was fixed by commit 689b097a06ba
("compiler-gcc: Suppress -Wmissing-prototypes warning for all supported
GCC"). So we should be able to pull this off now.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328102455.944131-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_display_device.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c index c02d79b50006..b8903bd0e82a 100644 --- a/drivers/gpu/drm/i915/display/intel_display_device.c +++ b/drivers/gpu/drm/i915/display/intel_display_device.c @@ -17,6 +17,9 @@ #include "intel_display_reg_defs.h" #include "intel_fbc.h" +__diag_push(); +__diag_ignore_all("-Woverride-init", "Allow field initialization overrides for display info"); + static const struct intel_display_device_info no_display = {}; #define PIPE_A_OFFSET 0x70000 @@ -768,6 +771,8 @@ static const struct intel_display_device_info xe2_lpd_display = { BIT(INTEL_FBC_C) | BIT(INTEL_FBC_D), }; +__diag_pop(); + /* * Separate detection for no display cases to keep the display id array simple. * |