linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/amd/amdgpu : Remove unused variable
@ 2016-05-17  9:42 Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 2/5] drm/amd/amdgpu/cz_dpm: " Muhammad Falak R Wani
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-17  9:42 UTC (permalink / raw)
  To: David Airlie
  Cc: Alex Deucher, Christian König, Jammy Zhou, yanyang1,
	Dave Airlie, Tom St Denis, dri-devel, linux-kernel

Remove unused variable 'ret', and directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
index f2f14fe..e78c9bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
@@ -103,7 +103,6 @@ static void cik_ih_disable_interrupts(struct amdgpu_device *adev)
  */
 static int cik_ih_irq_init(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	int rb_bufsz;
 	u32 interrupt_cntl, ih_cntl, ih_rb_cntl;
 	u64 wptr_off;
@@ -156,7 +155,7 @@ static int cik_ih_irq_init(struct amdgpu_device *adev)
 	/* enable irqs */
 	cik_ih_enable_interrupts(adev);
 
-	return ret;
+	return 0;
 }
 
 /**
-- 
1.9.1

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

* [PATCH 2/5] drm/amd/amdgpu/cz_dpm: Remove unused variable
  2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
@ 2016-05-17  9:42 ` Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 3/5] drm/amd/amdgpu : " Muhammad Falak R Wani
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-17  9:42 UTC (permalink / raw)
  To: David Airlie
  Cc: Alex Deucher, Christian König, Jammy Zhou, Sonny Jiang,
	Rex Zhu, yanyang1, dri-devel, linux-kernel

Remove unused variable 'ret' from functions where it
was not used anyway, and directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
index bf1847b..2f4ed17 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c
@@ -1579,7 +1579,6 @@ static int cz_dpm_update_sclk_limit(struct amdgpu_device *adev)
 
 static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	struct cz_power_info *pi = cz_get_pi(adev);
 
 	if (pi->caps_sclk_ds) {
@@ -1588,20 +1587,19 @@ static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev)
 				CZ_MIN_DEEP_SLEEP_SCLK);
 	}
 
-	return ret;
+	return 0;
 }
 
 /* ?? without dal support, is this still needed in setpowerstate list*/
 static int cz_dpm_set_watermark_threshold(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	struct cz_power_info *pi = cz_get_pi(adev);
 
 	cz_send_msg_to_smc_with_parameter(adev,
 			PPSMC_MSG_SetWatermarkFrequency,
 			pi->sclk_dpm.soft_max_clk);
 
-	return ret;
+	return 0;
 }
 
 static int cz_dpm_enable_nbdpm(struct amdgpu_device *adev)
@@ -1636,7 +1634,6 @@ static void cz_dpm_nbdpm_lm_pstate_enable(struct amdgpu_device *adev,
 
 static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	struct cz_power_info *pi = cz_get_pi(adev);
 	struct cz_ps *ps = &pi->requested_ps;
 
@@ -1647,21 +1644,19 @@ static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev)
 			cz_dpm_nbdpm_lm_pstate_enable(adev, true);
 	}
 
-	return ret;
+	return 0;
 }
 
 /* with dpm enabled */
 static int cz_dpm_set_power_state(struct amdgpu_device *adev)
 {
-	int ret = 0;
-
 	cz_dpm_update_sclk_limit(adev);
 	cz_dpm_set_deep_sleep_sclk_threshold(adev);
 	cz_dpm_set_watermark_threshold(adev);
 	cz_dpm_enable_nbdpm(adev);
 	cz_dpm_update_low_memory_pstate(adev);
 
-	return ret;
+	return 0;
 }
 
 static void cz_dpm_post_set_power_state(struct amdgpu_device *adev)
-- 
1.9.1

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

* [PATCH 3/5] drm/amd/amdgpu : Remove unused variable
  2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 2/5] drm/amd/amdgpu/cz_dpm: " Muhammad Falak R Wani
@ 2016-05-17  9:42 ` Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 4/5] " Muhammad Falak R Wani
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-17  9:42 UTC (permalink / raw)
  To: David Airlie
  Cc: Alex Deucher, Christian König, Jammy Zhou, Dave Airlie,
	Tom St Denis, yanyang1, dri-devel, linux-kernel

Remove unused variable 'ret', and directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
index 23bd912..964956f 100644
--- a/drivers/gpu/drm/amd/amdgpu/cz_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/cz_ih.c
@@ -103,7 +103,6 @@ static void cz_ih_disable_interrupts(struct amdgpu_device *adev)
  */
 static int cz_ih_irq_init(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	int rb_bufsz;
 	u32 interrupt_cntl, ih_cntl, ih_rb_cntl;
 	u64 wptr_off;
@@ -157,7 +156,7 @@ static int cz_ih_irq_init(struct amdgpu_device *adev)
 	/* enable interrupts */
 	cz_ih_enable_interrupts(adev);
 
-	return ret;
+	return 0;
 }
 
 /**
-- 
1.9.1

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

* [PATCH 4/5] drm/amd/amdgpu : Remove unused variable
  2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 2/5] drm/amd/amdgpu/cz_dpm: " Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 3/5] drm/amd/amdgpu : " Muhammad Falak R Wani
@ 2016-05-17  9:42 ` Muhammad Falak R Wani
  2016-05-17  9:42 ` [PATCH 5/5] " Muhammad Falak R Wani
  2016-05-17 20:37 ` [PATCH 1/5] " Alex Deucher
  4 siblings, 0 replies; 7+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-17  9:42 UTC (permalink / raw)
  To: David Airlie
  Cc: Alex Deucher, Christian König, Jammy Zhou, yanyang1,
	Dave Airlie, Tom St Denis, dri-devel, linux-kernel

Remove unused variable 'ret', and directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
index 5c4001e..e0169bb 100644
--- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
@@ -103,7 +103,6 @@ static void iceland_ih_disable_interrupts(struct amdgpu_device *adev)
  */
 static int iceland_ih_irq_init(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	int rb_bufsz;
 	u32 interrupt_cntl, ih_cntl, ih_rb_cntl;
 	u64 wptr_off;
@@ -157,7 +156,7 @@ static int iceland_ih_irq_init(struct amdgpu_device *adev)
 	/* enable interrupts */
 	iceland_ih_enable_interrupts(adev);
 
-	return ret;
+	return 0;
 }
 
 /**
-- 
1.9.1

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

* [PATCH 5/5] drm/amd/amdgpu : Remove unused variable
  2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
                   ` (2 preceding siblings ...)
  2016-05-17  9:42 ` [PATCH 4/5] " Muhammad Falak R Wani
@ 2016-05-17  9:42 ` Muhammad Falak R Wani
  2016-05-18  0:17   ` Zhang, Jerry
  2016-05-17 20:37 ` [PATCH 1/5] " Alex Deucher
  4 siblings, 1 reply; 7+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-17  9:42 UTC (permalink / raw)
  To: David Airlie
  Cc: Alex Deucher, Christian König, Jammy Zhou, Dave Airlie,
	Tom St Denis, yanyang1, Junwei Zhang, dri-devel, linux-kernel

Remove unused variable 'ret', and directly return 0.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
index 55cdab8..cba951a 100644
--- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
@@ -99,7 +99,6 @@ static void tonga_ih_disable_interrupts(struct amdgpu_device *adev)
  */
 static int tonga_ih_irq_init(struct amdgpu_device *adev)
 {
-	int ret = 0;
 	int rb_bufsz;
 	u32 interrupt_cntl, ih_rb_cntl, ih_doorbell_rtpr;
 	u64 wptr_off;
@@ -165,7 +164,7 @@ static int tonga_ih_irq_init(struct amdgpu_device *adev)
 	/* enable interrupts */
 	tonga_ih_enable_interrupts(adev);
 
-	return ret;
+	return 0;
 }
 
 /**
-- 
1.9.1

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

* Re: [PATCH 1/5] drm/amd/amdgpu : Remove unused variable
  2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
                   ` (3 preceding siblings ...)
  2016-05-17  9:42 ` [PATCH 5/5] " Muhammad Falak R Wani
@ 2016-05-17 20:37 ` Alex Deucher
  4 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-05-17 20:37 UTC (permalink / raw)
  To: Muhammad Falak R Wani
  Cc: David Airlie, Tom St Denis, Jammy Zhou, LKML,
	Maling list - DRI developers, yanyang1, Alex Deucher,
	Dave Airlie, Christian König

On Tue, May 17, 2016 at 5:42 AM, Muhammad Falak R Wani
<falakreyaz@gmail.com> wrote:
> Remove unused variable 'ret', and directly return 0.
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

Applied the series.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> index f2f14fe..e78c9bd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
> @@ -103,7 +103,6 @@ static void cik_ih_disable_interrupts(struct amdgpu_device *adev)
>   */
>  static int cik_ih_irq_init(struct amdgpu_device *adev)
>  {
> -       int ret = 0;
>         int rb_bufsz;
>         u32 interrupt_cntl, ih_cntl, ih_rb_cntl;
>         u64 wptr_off;
> @@ -156,7 +155,7 @@ static int cik_ih_irq_init(struct amdgpu_device *adev)
>         /* enable irqs */
>         cik_ih_enable_interrupts(adev);
>
> -       return ret;
> +       return 0;
>  }
>
>  /**
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* RE: [PATCH 5/5] drm/amd/amdgpu : Remove unused variable
  2016-05-17  9:42 ` [PATCH 5/5] " Muhammad Falak R Wani
@ 2016-05-18  0:17   ` Zhang, Jerry
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Jerry @ 2016-05-18  0:17 UTC (permalink / raw)
  To: Muhammad Falak R Wani, David Airlie
  Cc: Deucher, Alexander, Koenig, Christian, Zhou, Jammy, Dave Airlie,
	StDenis, Tom, Yang, Young, dri-devel, linux-kernel

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

Regards,
Jerry (Junwei Zhang)

SRDC SW Development
AMD Shanghai
_____________________________________

> -----Original Message-----
> From: Muhammad Falak R Wani [mailto:falakreyaz@gmail.com]
> Sent: Tuesday, May 17, 2016 5:43 PM
> To: David Airlie
> Cc: Deucher, Alexander; Koenig, Christian; Zhou, Jammy; Dave Airlie; StDenis,
> Tom; Yang, Young; Zhang, Jerry; dri-devel@lists.freedesktop.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 5/5] drm/amd/amdgpu : Remove unused variable
> 
> Remove unused variable 'ret', and directly return 0.
> 
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> index 55cdab8..cba951a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c
> @@ -99,7 +99,6 @@ static void tonga_ih_disable_interrupts(struct
> amdgpu_device *adev)
>   */
>  static int tonga_ih_irq_init(struct amdgpu_device *adev)  {
> -	int ret = 0;
>  	int rb_bufsz;
>  	u32 interrupt_cntl, ih_rb_cntl, ih_doorbell_rtpr;
>  	u64 wptr_off;
> @@ -165,7 +164,7 @@ static int tonga_ih_irq_init(struct amdgpu_device *adev)
>  	/* enable interrupts */
>  	tonga_ih_enable_interrupts(adev);
> 
> -	return ret;
> +	return 0;
>  }
> 
>  /**
> --
> 1.9.1

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

end of thread, other threads:[~2016-05-18  0:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17  9:42 [PATCH 1/5] drm/amd/amdgpu : Remove unused variable Muhammad Falak R Wani
2016-05-17  9:42 ` [PATCH 2/5] drm/amd/amdgpu/cz_dpm: " Muhammad Falak R Wani
2016-05-17  9:42 ` [PATCH 3/5] drm/amd/amdgpu : " Muhammad Falak R Wani
2016-05-17  9:42 ` [PATCH 4/5] " Muhammad Falak R Wani
2016-05-17  9:42 ` [PATCH 5/5] " Muhammad Falak R Wani
2016-05-18  0:17   ` Zhang, Jerry
2016-05-17 20:37 ` [PATCH 1/5] " Alex Deucher

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).