Skip to content

Commit acc978d

Browse files
tongtiangenrobclark
authored andcommitted
drm/msm/dpu: Remove some set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function _dpu_debugfs_show_regset32: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:142:26: warning: variable priv set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function dpu_kms_prepare_commit: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:271:21: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function _dpu_kms_hw_destroy: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:555:21: warning: variable dev set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function dpu_kms_hw_init: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:763:26: warning: variable priv set but not used [-Wunused-but-set-variable] drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function dpu_runtime_suspend: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1021:21: warning: variable ddev set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot <[email protected]> Signed-off-by: tongtiangen <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent b83caf4 commit acc978d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,12 @@ static int _dpu_debugfs_show_regset32(struct seq_file *s, void *data)
138138
{
139139
struct dpu_debugfs_regset32 *regset = s->private;
140140
struct dpu_kms *dpu_kms = regset->dpu_kms;
141-
struct drm_device *dev;
142-
struct msm_drm_private *priv;
143141
void __iomem *base;
144142
uint32_t i, addr;
145143

146144
if (!dpu_kms->mmio)
147145
return 0;
148146

149-
dev = dpu_kms->dev;
150-
priv = dev->dev_private;
151147
base = dpu_kms->mmio + regset->offset;
152148

153149
/* insert padding spaces, if needed */
@@ -346,17 +342,13 @@ static ktime_t dpu_kms_vsync_time(struct msm_kms *kms, struct drm_crtc *crtc)
346342
static void dpu_kms_prepare_commit(struct msm_kms *kms,
347343
struct drm_atomic_state *state)
348344
{
349-
struct dpu_kms *dpu_kms;
350-
struct drm_device *dev;
351345
struct drm_crtc *crtc;
352346
struct drm_crtc_state *crtc_state;
353347
struct drm_encoder *encoder;
354348
int i;
355349

356350
if (!kms)
357351
return;
358-
dpu_kms = to_dpu_kms(kms);
359-
dev = dpu_kms->dev;
360352

361353
/* Call prepare_commit for all affected encoders */
362354
for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
@@ -631,11 +623,8 @@ static long dpu_kms_round_pixclk(struct msm_kms *kms, unsigned long rate,
631623

632624
static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms)
633625
{
634-
struct drm_device *dev;
635626
int i;
636627

637-
dev = dpu_kms->dev;
638-
639628
if (dpu_kms->hw_intr)
640629
dpu_hw_intr_destroy(dpu_kms->hw_intr);
641630
dpu_kms->hw_intr = NULL;
@@ -839,7 +828,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
839828
{
840829
struct dpu_kms *dpu_kms;
841830
struct drm_device *dev;
842-
struct msm_drm_private *priv;
843831
int i, rc = -EINVAL;
844832

845833
if (!kms) {
@@ -854,8 +842,6 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
854842
if (rc)
855843
return rc;
856844

857-
priv = dev->dev_private;
858-
859845
atomic_set(&dpu_kms->bandwidth_ref, 0);
860846

861847
dpu_kms->mmio = msm_ioremap(dpu_kms->pdev, "mdp", "mdp");
@@ -1102,10 +1088,8 @@ static int __maybe_unused dpu_runtime_suspend(struct device *dev)
11021088
int rc = -1;
11031089
struct platform_device *pdev = to_platform_device(dev);
11041090
struct dpu_kms *dpu_kms = platform_get_drvdata(pdev);
1105-
struct drm_device *ddev;
11061091
struct dss_module_power *mp = &dpu_kms->mp;
11071092

1108-
ddev = dpu_kms->dev;
11091093
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, false);
11101094
if (rc)
11111095
DPU_ERROR("clock disable failed rc:%d\n", rc);

0 commit comments

Comments
 (0)