diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-05-26 00:06:53 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-05-31 18:16:43 +0300 |
commit | 88e9664434c994e97a9f6f8cdd1535495c660cea (patch) | |
tree | 32fc6bec816db9c82318ced24eba84c229b87a8b /drivers/gpu/drm/i915/i915_pci.c | |
parent | e2a9f0a32464f435dbdb190ff7dbf09745703b60 (diff) |
drm/i915: use localized __diag_ignore_all() instead of per file
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.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230525210653.1048972-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_pci.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 928975d5fe2f..3d7a5db9833b 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -38,6 +38,9 @@ #include "i915_reg.h" #include "intel_pci_config.h" +__diag_push(); +__diag_ignore_all("-Woverride-init", "Allow overriding inherited members"); + #define PLATFORM(x) .platform = (x) #define GEN(x) \ .__runtime.graphics.ip.ver = (x), \ @@ -843,6 +846,8 @@ static const struct intel_device_info mtl_info = { #undef PLATFORM +__diag_pop(); + /* * Make sure any device matches here are from most specific to most * general. For example, since the Quanta match is based on the subsystem |