Skip to contentSkip to conversation

drm/gma500: remove set but not used variables 'hist_reg'

PATCH Applied Chen Zhou 2 participants 2 messages Dec 27, 2019 – Jan 8, 2020

Subsystems (3)
lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 drm/gma500: remove set but not used variables 'hist_reg'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/psb_irq.c: In function psb_irq_turn_off_dpst:
drivers/gpu/drm/gma500/psb_irq.c:473:6:
warning: variable hist_reg set but not used [-Wunused-but-set-variable]

---
 drivers/gpu/drm/gma500/psb_irq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/gma500/psb_irq.c +1 -2
index 40a37e4..91f9001 100644
@@ -470,12 +470,11 @@ void psb_irq_turn_off_dpst(struct drm_device *dev)
 {
 	struct drm_psb_private *dev_priv =
 	    (struct drm_psb_private *) dev->dev_private;
-	u32 hist_reg;
 	u32 pwm_reg;
 
 	if (gma_power_begin(dev, false)) {
 		PSB_WVDC32(0x00000000, HISTOGRAM_INT_CONTROL);
-		hist_reg = PSB_RVDC32(HISTOGRAM_INT_CONTROL);
+		PSB_RVDC32(HISTOGRAM_INT_CONTROL);
 
 		psb_disable_pipestat(dev_priv, 0, PIPE_DPST_EVENT_ENABLE);
 
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 9 lines · Chen Zhou

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/psb_irq.c: In function psb_irq_turn_off_dpst:
drivers/gpu/drm/gma500/psb_irq.c:473:6:
warning: variable hist_reg set but not used [-Wunused-but-set-variable]

Applied to drm-misc-next

Thanks
Patrik

Quoted 23 lines
---
 drivers/gpu/drm/gma500/psb_irq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/gma500/psb_irq.c +1 -3
index 40a37e4..91f9001 100644
@@ -470,12 +470,11 @@ void psb_irq_turn_off_dpst(struct drm_device *dev)
 {
        struct drm_psb_private *dev_priv =
            (struct drm_psb_private *) dev->dev_private;
-       u32 hist_reg;
        u32 pwm_reg;
 
        if (gma_power_begin(dev, false)) {
                PSB_WVDC32(0x00000000, HISTOGRAM_INT_CONTROL);
-               hist_reg = PSB_RVDC32(HISTOGRAM_INT_CONTROL);
+               PSB_RVDC32(HISTOGRAM_INT_CONTROL);
 
                psb_disable_pipestat(dev_priv, 0, PIPE_DPST_EVENT_ENABLE);
 
--
Quoted 2 lines

2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel