dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/gma500: remove some set but not used variables
@ 2019-11-15 14:27 zhengbin
  2019-11-15 14:27 ` zhengbin
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

zhengbin (3):
  drm/gma500: remove set but not used variable 'htotal'
  drm/gma500: remove set but not used variable 'error'
  drm/gma500: remove set but not used variable 'is_hdmi','is_crt'

 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-----
 drivers/gpu/drm/gma500/oaktrail_hdmi.c     | 4 +---
 drivers/gpu/drm/gma500/psb_irq.c           | 2 --
 3 files changed, 3 insertions(+), 10 deletions(-)

--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0/3] drm/gma500: remove some set but not used variables
  2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
@ 2019-11-15 14:27 ` zhengbin
  2019-11-15 14:27 ` [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal' zhengbin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

zhengbin (3):
  drm/gma500: remove set but not used variable 'htotal'
  drm/gma500: remove set but not used variable 'error'
  drm/gma500: remove set but not used variable 'is_hdmi','is_crt'

 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-----
 drivers/gpu/drm/gma500/oaktrail_hdmi.c     | 4 +---
 drivers/gpu/drm/gma500/psb_irq.c           | 2 --
 3 files changed, 3 insertions(+), 10 deletions(-)

--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal'
  2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
  2019-11-15 14:27 ` zhengbin
@ 2019-11-15 14:27 ` zhengbin
  2019-11-15 14:27   ` zhengbin
  2019-11-15 14:27 ` [PATCH 2/3] drm/gma500: remove set but not used variable 'error' zhengbin
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/oaktrail_hdmi.c: In function htotal_calculate:
drivers/gpu/drm/gma500/oaktrail_hdmi.c:160:6: warning: variable htotal set but not used [-Wunused-but-set-variable]

It is introduced by commit 39ec748f7174 ("gma600: Enable HDMI support"),
but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index f4c5208..f437023 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -159,9 +159,7 @@ static void oaktrail_hdmi_audio_disable(struct drm_device *dev)

 static unsigned int htotal_calculate(struct drm_display_mode *mode)
 {
-	u32 htotal, new_crtc_htotal;
-
-	htotal = (mode->crtc_hdisplay - 1) | ((mode->crtc_htotal - 1) << 16);
+	u32 new_crtc_htotal;

 	/*
 	 * 1024 x 768  new_crtc_htotal = 0x1024;
--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal'
  2019-11-15 14:27 ` [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal' zhengbin
@ 2019-11-15 14:27   ` zhengbin
  0 siblings, 0 replies; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/oaktrail_hdmi.c: In function htotal_calculate:
drivers/gpu/drm/gma500/oaktrail_hdmi.c:160:6: warning: variable htotal set but not used [-Wunused-but-set-variable]

It is introduced by commit 39ec748f7174 ("gma600: Enable HDMI support"),
but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index f4c5208..f437023 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -159,9 +159,7 @@ static void oaktrail_hdmi_audio_disable(struct drm_device *dev)

 static unsigned int htotal_calculate(struct drm_display_mode *mode)
 {
-	u32 htotal, new_crtc_htotal;
-
-	htotal = (mode->crtc_hdisplay - 1) | ((mode->crtc_htotal - 1) << 16);
+	u32 new_crtc_htotal;

 	/*
 	 * 1024 x 768  new_crtc_htotal = 0x1024;
--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] drm/gma500: remove set but not used variable 'error'
  2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
  2019-11-15 14:27 ` zhengbin
  2019-11-15 14:27 ` [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal' zhengbin
@ 2019-11-15 14:27 ` zhengbin
  2019-11-15 14:27   ` zhengbin
  2019-11-15 14:27 ` [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt' zhengbin
  2019-11-15 19:44 ` [PATCH 0/3] drm/gma500: remove some set but not used variables Daniel Vetter
  4 siblings, 1 reply; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/psb_irq.c: In function psb_sgx_interrupt:
drivers/gpu/drm/gma500/psb_irq.c:210:6: warning: variable error set but not used [-Wunused-but-set-variable]

It is introduced by commit 64a4aff283ac ("drm/gma500:
Add support for SGX interrupts"), but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/psb_irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c
index e6265fb..dc6a73a 100644
--- a/drivers/gpu/drm/gma500/psb_irq.c
+++ b/drivers/gpu/drm/gma500/psb_irq.c
@@ -194,7 +194,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 stat_1, u32 stat_2)
 {
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	u32 val, addr;
-	int error = false;

 	if (stat_1 & _PSB_CE_TWOD_COMPLETE)
 		val = PSB_RSGX32(PSB_CR_2D_BLIT_STATUS);
@@ -229,7 +228,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 stat_1, u32 stat_2)

 			DRM_ERROR("\tMMU failing address is 0x%08x.\n",
 				  (unsigned int)addr);
-			error = true;
 		}
 	}

--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] drm/gma500: remove set but not used variable 'error'
  2019-11-15 14:27 ` [PATCH 2/3] drm/gma500: remove set but not used variable 'error' zhengbin
@ 2019-11-15 14:27   ` zhengbin
  0 siblings, 0 replies; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/psb_irq.c: In function psb_sgx_interrupt:
drivers/gpu/drm/gma500/psb_irq.c:210:6: warning: variable error set but not used [-Wunused-but-set-variable]

It is introduced by commit 64a4aff283ac ("drm/gma500:
Add support for SGX interrupts"), but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/psb_irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c
index e6265fb..dc6a73a 100644
--- a/drivers/gpu/drm/gma500/psb_irq.c
+++ b/drivers/gpu/drm/gma500/psb_irq.c
@@ -194,7 +194,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 stat_1, u32 stat_2)
 {
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	u32 val, addr;
-	int error = false;

 	if (stat_1 & _PSB_CE_TWOD_COMPLETE)
 		val = PSB_RSGX32(PSB_CR_2D_BLIT_STATUS);
@@ -229,7 +228,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 stat_1, u32 stat_2)

 			DRM_ERROR("\tMMU failing address is 0x%08x.\n",
 				  (unsigned int)addr);
-			error = true;
 		}
 	}

--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt'
  2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
                   ` (2 preceding siblings ...)
  2019-11-15 14:27 ` [PATCH 2/3] drm/gma500: remove set but not used variable 'error' zhengbin
@ 2019-11-15 14:27 ` zhengbin
  2019-11-15 14:27   ` zhengbin
  2019-11-15 19:44 ` [PATCH 0/3] drm/gma500: remove some set but not used variables Daniel Vetter
  4 siblings, 1 reply; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:594:7: warning: variable is_hdmi set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:593:7: warning: variable is_crt set but not used [-Wunused-but-set-variable]

They are not used since commit acd7ef927e06 ("gma500:
Update the Cedarview clock handling")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c
index 8b78494..334a203 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -582,8 +582,8 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
 	struct gma_clock_t clock;
 	u32 dpll = 0, dspcntr, pipeconf;
 	bool ok;
-	bool is_crt = false, is_lvds = false, is_tv = false;
-	bool is_hdmi = false, is_dp = false;
+	bool is_lvds = false, is_tv = false;
+	bool is_dp = false;
 	struct drm_mode_config *mode_config = &dev->mode_config;
 	struct drm_connector *connector;
 	const struct gma_limit_t *limit;
@@ -607,10 +607,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
 			is_tv = true;
 			break;
 		case INTEL_OUTPUT_ANALOG:
-			is_crt = true;
-			break;
 		case INTEL_OUTPUT_HDMI:
-			is_hdmi = true;
 			break;
 		case INTEL_OUTPUT_DISPLAYPORT:
 			is_dp = true;
--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt'
  2019-11-15 14:27 ` [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt' zhengbin
@ 2019-11-15 14:27   ` zhengbin
  0 siblings, 0 replies; 9+ messages in thread
From: zhengbin @ 2019-11-15 14:27 UTC (permalink / raw)
  To: patrik.r.jakobsson, daniel.vetter, airlied, daniel, dri-devel; +Cc: zhengbin13

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

drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:594:7: warning: variable is_hdmi set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:593:7: warning: variable is_crt set but not used [-Wunused-but-set-variable]

They are not used since commit acd7ef927e06 ("gma500:
Update the Cedarview clock handling")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c
index 8b78494..334a203 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -582,8 +582,8 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
 	struct gma_clock_t clock;
 	u32 dpll = 0, dspcntr, pipeconf;
 	bool ok;
-	bool is_crt = false, is_lvds = false, is_tv = false;
-	bool is_hdmi = false, is_dp = false;
+	bool is_lvds = false, is_tv = false;
+	bool is_dp = false;
 	struct drm_mode_config *mode_config = &dev->mode_config;
 	struct drm_connector *connector;
 	const struct gma_limit_t *limit;
@@ -607,10 +607,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
 			is_tv = true;
 			break;
 		case INTEL_OUTPUT_ANALOG:
-			is_crt = true;
-			break;
 		case INTEL_OUTPUT_HDMI:
-			is_hdmi = true;
 			break;
 		case INTEL_OUTPUT_DISPLAYPORT:
 			is_dp = true;
--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] drm/gma500: remove some set but not used variables
  2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
                   ` (3 preceding siblings ...)
  2019-11-15 14:27 ` [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt' zhengbin
@ 2019-11-15 19:44 ` Daniel Vetter
  4 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-11-15 19:44 UTC (permalink / raw)
  To: zhengbin; +Cc: airlied, daniel.vetter, dri-devel

On Fri, Nov 15, 2019 at 10:27:04PM +0800, zhengbin wrote:
> zhengbin (3):
>   drm/gma500: remove set but not used variable 'htotal'
>   drm/gma500: remove set but not used variable 'error'
>   drm/gma500: remove set but not used variable 'is_hdmi','is_crt'

All three applied, thanks for the patches.
-Daniel

> 
>  drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-----
>  drivers/gpu/drm/gma500/oaktrail_hdmi.c     | 4 +---
>  drivers/gpu/drm/gma500/psb_irq.c           | 2 --
>  3 files changed, 3 insertions(+), 10 deletions(-)
> 
> --
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-17 11:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 14:27 [PATCH 0/3] drm/gma500: remove some set but not used variables zhengbin
2019-11-15 14:27 ` zhengbin
2019-11-15 14:27 ` [PATCH 1/3] drm/gma500: remove set but not used variable 'htotal' zhengbin
2019-11-15 14:27   ` zhengbin
2019-11-15 14:27 ` [PATCH 2/3] drm/gma500: remove set but not used variable 'error' zhengbin
2019-11-15 14:27   ` zhengbin
2019-11-15 14:27 ` [PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt' zhengbin
2019-11-15 14:27   ` zhengbin
2019-11-15 19:44 ` [PATCH 0/3] drm/gma500: remove some set but not used variables Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).