drm/i915: annotate maybe unused but set intel_crtc_state variables

Prepare for re-enabling -Wunused-but-set-variable.

for_each_new_intel_crtc_in_state() requires passing in a struct
intel_crtc_state pointer, which it uses, but in a few places this leads
to warning about unused but set variables. Annotate them with
__maybe_unused.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/eb041f426bc3d76ef7a0ea906f99367cbf439b1a.1685119007.git.jani.nikula@intel.com
This commit is contained in:
Jani Nikula
2023-05-26 19:38:06 +03:00
parent ace873049e
commit 84f9c3c73b
2 changed files with 2 additions and 2 deletions

View File

@@ -5715,7 +5715,7 @@ static int intel_atomic_check_planes(struct intel_atomic_state *state)
static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
{
struct intel_crtc_state *crtc_state;
struct intel_crtc_state __maybe_unused *crtc_state;
struct intel_crtc *crtc;
int i;

View File

@@ -2900,7 +2900,7 @@ static int
skl_compute_wm(struct intel_atomic_state *state)
{
struct intel_crtc *crtc;
struct intel_crtc_state *new_crtc_state;
struct intel_crtc_state __maybe_unused *new_crtc_state;
int ret, i;
for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {