diff mbox series

[09/37] drm/tegra/dc: Remove set but unused variable 'state'

Message ID 20230317081718.2650744-10-lee@kernel.org (mailing list archive)
State New, archived
Headers show
Series Rid W=1 warnings from GPU | expand

Commit Message

Lee Jones March 17, 2023, 8:16 a.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/tegra/dc.c: In function ‘tegra_crtc_calculate_memory_bandwidth’:
 drivers/gpu/drm/tegra/dc.c:2384:38: warning: variable ‘old_state’ set but not used [-Wunused-but-set-variable]

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
---
 drivers/gpu/drm/tegra/dc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Thierry Reding April 4, 2023, 12:14 p.m. UTC | #1
From: Thierry Reding <treding@nvidia.com>

On Fri, 17 Mar 2023 08:16:50 +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/gpu/drm/tegra/dc.c: In function ‘tegra_crtc_calculate_memory_bandwidth’:
>  drivers/gpu/drm/tegra/dc.c:2384:38: warning: variable ‘old_state’ set but not used [-Wunused-but-set-variable]
> 
> 

Applied, thanks!

[09/37] drm/tegra/dc: Remove set but unused variable 'state'
        commit: 42d364ad88ee81356f0417170bafbdc894594914

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index a67453cee8832..cafa1720026cc 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2381,7 +2381,6 @@  static int tegra_crtc_calculate_memory_bandwidth(struct drm_crtc *crtc,
 	const struct tegra_plane_state *tegra_state;
 	const struct drm_plane_state *plane_state;
 	struct tegra_dc *dc = to_tegra_dc(crtc);
-	const struct drm_crtc_state *old_state;
 	struct drm_crtc_state *new_state;
 	struct tegra_plane *tegra;
 	struct drm_plane *plane;
@@ -2396,7 +2395,6 @@  static int tegra_crtc_calculate_memory_bandwidth(struct drm_crtc *crtc,
 		return 0;
 
 	new_state = drm_atomic_get_new_crtc_state(state, crtc);
-	old_state = drm_atomic_get_old_crtc_state(state, crtc);
 
 	/*
 	 * For overlapping planes pixel's data is fetched for each plane at