All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 18:34 ` Khalid Masum
  0 siblings, 0 replies; 8+ messages in thread
From: Khalid Masum @ 2022-08-15 18:34 UTC (permalink / raw)
  To: Ruijing Dong, amd-gfx, dri-devel, linux-kernel
  Cc: Wan Jiabing, Khalid Masum, David Airlie, Greg Kroah-Hartman,
	Pan Xinhui, Sonny Jiang, Alex Deucher, James Zhu, Leo Liu,
	Christian König

There is no point in returning an int here. It only returns 0 which
the caller never uses. Therefore return void and remove the unnecessary 
assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://lore.kernel.org/lkml/20220815070056.10816-1-khalid.masum.92@gmail.com/

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 {
 	uint32_t tmp;
 
@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 	/* disable dynamic power gating mode */
 	WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
 		~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-	return 0;
 }
 
 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
 		fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
 
 		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-			r = vcn_v4_0_stop_dpg_mode(adev, i);
+			vcn_v4_0_stop_dpg_mode(adev, i);
 			continue;
 		}
 
-- 
2.37.1


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

* [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 18:34 ` Khalid Masum
  0 siblings, 0 replies; 8+ messages in thread
From: Khalid Masum @ 2022-08-15 18:34 UTC (permalink / raw)
  To: Ruijing Dong, amd-gfx, dri-devel, linux-kernel
  Cc: Wan Jiabing, Khalid Masum, David Airlie, Greg Kroah-Hartman,
	Pan Xinhui, Sonny Jiang, Daniel Vetter, Alex Deucher, James Zhu,
	Leo Liu, Christian König

There is no point in returning an int here. It only returns 0 which
the caller never uses. Therefore return void and remove the unnecessary 
assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://lore.kernel.org/lkml/20220815070056.10816-1-khalid.masum.92@gmail.com/

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 {
 	uint32_t tmp;
 
@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 	/* disable dynamic power gating mode */
 	WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
 		~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-	return 0;
 }
 
 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
 		fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
 
 		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-			r = vcn_v4_0_stop_dpg_mode(adev, i);
+			vcn_v4_0_stop_dpg_mode(adev, i);
 			continue;
 		}
 
-- 
2.37.1


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

* [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 18:34 ` Khalid Masum
  0 siblings, 0 replies; 8+ messages in thread
From: Khalid Masum @ 2022-08-15 18:34 UTC (permalink / raw)
  To: Ruijing Dong, amd-gfx, dri-devel, linux-kernel
  Cc: Alex Deucher, Christian König, Pan Xinhui, David Airlie,
	Daniel Vetter, James Zhu, Leo Liu, Sonny Jiang, Wan Jiabing,
	Greg Kroah-Hartman, Khalid Masum

There is no point in returning an int here. It only returns 0 which
the caller never uses. Therefore return void and remove the unnecessary 
assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://lore.kernel.org/lkml/20220815070056.10816-1-khalid.masum.92@gmail.com/

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 {
 	uint32_t tmp;
 
@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
 	/* disable dynamic power gating mode */
 	WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
 		~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-	return 0;
 }
 
 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
 		fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
 
 		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-			r = vcn_v4_0_stop_dpg_mode(adev, i);
+			vcn_v4_0_stop_dpg_mode(adev, i);
 			continue;
 		}
 
-- 
2.37.1


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

* RE: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
  2022-08-15 18:34 ` Khalid Masum
  (?)
@ 2022-08-15 18:39   ` Dong, Ruijing
  -1 siblings, 0 replies; 8+ messages in thread
From: Dong, Ruijing @ 2022-08-15 18:39 UTC (permalink / raw)
  To: Khalid Masum, amd-gfx, dri-devel, linux-kernel
  Cc: Wan Jiabing, David Airlie, Greg Kroah-Hartman, Pan, Xinhui,
	Jiang, Sonny, Deucher, Alexander, Zhu, James, Liu, Leo, Koenig,
	Christian

[AMD Official Use Only - General]

This patch is

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>

Thanks,
Ruijing

-----Original Message-----
From: Khalid Masum <khalid.masum.92@gmail.com>
Sent: Monday, August 15, 2022 2:34 PM
To: Dong, Ruijing <Ruijing.Dong@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Zhu, James <James.Zhu@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Jiang, Sonny <Sonny.Jiang@amd.com>; Wan Jiabing <wanjiabing@vivo.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Khalid Masum <khalid.masum.92@gmail.com>
Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode

There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220815070056.10816-1-khalid.masum.92%40gmail.com%2F&amp;data=05%7C01%7Cruijing.dong%40amd.com%7C017222a9e81f49ea336f08da7eecd6c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637961852950464412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TyXtoF2flWNqabtiJ%2BDVcR2vdsnLZ19qr3b%2BQT2DBQA%3D&amp;reserved=0

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int
+inst_idx)
 {
        uint32_t tmp;

@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
        /* disable dynamic power gating mode */
        WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
                ~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-       return 0;
 }

 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
                fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;

                if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-                       r = vcn_v4_0_stop_dpg_mode(adev, i);
+                       vcn_v4_0_stop_dpg_mode(adev, i);
                        continue;
                }

--
2.37.1


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

* RE: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 18:39   ` Dong, Ruijing
  0 siblings, 0 replies; 8+ messages in thread
From: Dong, Ruijing @ 2022-08-15 18:39 UTC (permalink / raw)
  To: Khalid Masum, amd-gfx, dri-devel, linux-kernel
  Cc: Wan Jiabing, David Airlie, Greg Kroah-Hartman, Pan, Xinhui,
	Jiang, Sonny, Daniel Vetter, Deucher, Alexander, Zhu, James, Liu,
	Leo, Koenig, Christian

[AMD Official Use Only - General]

This patch is

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>

Thanks,
Ruijing

-----Original Message-----
From: Khalid Masum <khalid.masum.92@gmail.com>
Sent: Monday, August 15, 2022 2:34 PM
To: Dong, Ruijing <Ruijing.Dong@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Zhu, James <James.Zhu@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Jiang, Sonny <Sonny.Jiang@amd.com>; Wan Jiabing <wanjiabing@vivo.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Khalid Masum <khalid.masum.92@gmail.com>
Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode

There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220815070056.10816-1-khalid.masum.92%40gmail.com%2F&amp;data=05%7C01%7Cruijing.dong%40amd.com%7C017222a9e81f49ea336f08da7eecd6c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637961852950464412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TyXtoF2flWNqabtiJ%2BDVcR2vdsnLZ19qr3b%2BQT2DBQA%3D&amp;reserved=0

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int
+inst_idx)
 {
        uint32_t tmp;

@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
        /* disable dynamic power gating mode */
        WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
                ~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-       return 0;
 }

 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
                fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;

                if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-                       r = vcn_v4_0_stop_dpg_mode(adev, i);
+                       vcn_v4_0_stop_dpg_mode(adev, i);
                        continue;
                }

--
2.37.1


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

* RE: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 18:39   ` Dong, Ruijing
  0 siblings, 0 replies; 8+ messages in thread
From: Dong, Ruijing @ 2022-08-15 18:39 UTC (permalink / raw)
  To: Khalid Masum, amd-gfx, dri-devel, linux-kernel
  Cc: Deucher, Alexander, Koenig, Christian, Pan, Xinhui, David Airlie,
	Daniel Vetter, Zhu, James, Liu, Leo, Jiang, Sonny, Wan Jiabing,
	Greg Kroah-Hartman

[AMD Official Use Only - General]

This patch is

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>

Thanks,
Ruijing

-----Original Message-----
From: Khalid Masum <khalid.masum.92@gmail.com>
Sent: Monday, August 15, 2022 2:34 PM
To: Dong, Ruijing <Ruijing.Dong@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Zhu, James <James.Zhu@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Jiang, Sonny <Sonny.Jiang@amd.com>; Wan Jiabing <wanjiabing@vivo.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Khalid Masum <khalid.masum.92@gmail.com>
Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode

There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.

Addresses-Coverity: 1504988 ("Unused value")
Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
Past discussions:
- V1 Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220815070056.10816-1-khalid.masum.92%40gmail.com%2F&amp;data=05%7C01%7Cruijing.dong%40amd.com%7C017222a9e81f49ea336f08da7eecd6c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637961852950464412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TyXtoF2flWNqabtiJ%2BDVcR2vdsnLZ19qr3b%2BQT2DBQA%3D&amp;reserved=0

Changes since V1:
- Make stop_dbg_mode return void
- Update commit description

 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index ca14c3ef742e..fb2d74f30448 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
  *
  * Stop VCN block with dpg mode
  */
-static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
+static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int
+inst_idx)
 {
        uint32_t tmp;

@@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
        /* disable dynamic power gating mode */
        WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
                ~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
-       return 0;
 }

 /**
@@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
                fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;

                if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
-                       r = vcn_v4_0_stop_dpg_mode(adev, i);
+                       vcn_v4_0_stop_dpg_mode(adev, i);
                        continue;
                }

--
2.37.1


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

* Re: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
  2022-08-15 18:39   ` Dong, Ruijing
@ 2022-08-15 20:48     ` Alex Deucher
  -1 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2022-08-15 20:48 UTC (permalink / raw)
  To: Dong, Ruijing
  Cc: Wan Jiabing, Khalid Masum, David Airlie, Greg Kroah-Hartman, Pan,
	Xinhui, linux-kernel, dri-devel, Jiang, Sonny, amd-gfx, Deucher,
	Alexander, Zhu, James, Liu, Leo, Koenig, Christian

Applied.  Thanks!

Alex

On Mon, Aug 15, 2022 at 2:40 PM Dong, Ruijing <Ruijing.Dong@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> This patch is
>
> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
>
> Thanks,
> Ruijing
>
> -----Original Message-----
> From: Khalid Masum <khalid.masum.92@gmail.com>
> Sent: Monday, August 15, 2022 2:34 PM
> To: Dong, Ruijing <Ruijing.Dong@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Zhu, James <James.Zhu@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Jiang, Sonny <Sonny.Jiang@amd.com>; Wan Jiabing <wanjiabing@vivo.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Khalid Masum <khalid.masum.92@gmail.com>
> Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
>
> There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.
>
> Addresses-Coverity: 1504988 ("Unused value")
> Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
> Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
> ---
> Past discussions:
> - V1 Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220815070056.10816-1-khalid.masum.92%40gmail.com%2F&amp;data=05%7C01%7Cruijing.dong%40amd.com%7C017222a9e81f49ea336f08da7eecd6c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637961852950464412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TyXtoF2flWNqabtiJ%2BDVcR2vdsnLZ19qr3b%2BQT2DBQA%3D&amp;reserved=0
>
> Changes since V1:
> - Make stop_dbg_mode return void
> - Update commit description
>
>  drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> index ca14c3ef742e..fb2d74f30448 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> @@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
>   *
>   * Stop VCN block with dpg mode
>   */
> -static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
> +static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int
> +inst_idx)
>  {
>         uint32_t tmp;
>
> @@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
>         /* disable dynamic power gating mode */
>         WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
>                 ~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
> -       return 0;
>  }
>
>  /**
> @@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
>                 fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
>
>                 if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
> -                       r = vcn_v4_0_stop_dpg_mode(adev, i);
> +                       vcn_v4_0_stop_dpg_mode(adev, i);
>                         continue;
>                 }
>
> --
> 2.37.1
>

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

* Re: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
@ 2022-08-15 20:48     ` Alex Deucher
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Deucher @ 2022-08-15 20:48 UTC (permalink / raw)
  To: Dong, Ruijing
  Cc: Khalid Masum, amd-gfx, dri-devel, linux-kernel, Wan Jiabing,
	David Airlie, Greg Kroah-Hartman, Pan, Xinhui, Jiang, Sonny,
	Deucher, Alexander, Zhu, James, Liu, Leo, Koenig, Christian

Applied.  Thanks!

Alex

On Mon, Aug 15, 2022 at 2:40 PM Dong, Ruijing <Ruijing.Dong@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> This patch is
>
> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
>
> Thanks,
> Ruijing
>
> -----Original Message-----
> From: Khalid Masum <khalid.masum.92@gmail.com>
> Sent: Monday, August 15, 2022 2:34 PM
> To: Dong, Ruijing <Ruijing.Dong@amd.com>; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; Zhu, James <James.Zhu@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Jiang, Sonny <Sonny.Jiang@amd.com>; Wan Jiabing <wanjiabing@vivo.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Khalid Masum <khalid.masum.92@gmail.com>
> Subject: [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode
>
> There is no point in returning an int here. It only returns 0 which the caller never uses. Therefore return void and remove the unnecessary assignment.
>
> Addresses-Coverity: 1504988 ("Unused value")
> Fixes: 8da1170a16e4 ("drm/amdgpu: add VCN4 ip block support")
> Suggested-by: Ruijing Dong <ruijing.dong@amd.com>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
> ---
> Past discussions:
> - V1 Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F20220815070056.10816-1-khalid.masum.92%40gmail.com%2F&amp;data=05%7C01%7Cruijing.dong%40amd.com%7C017222a9e81f49ea336f08da7eecd6c8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637961852950464412%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TyXtoF2flWNqabtiJ%2BDVcR2vdsnLZ19qr3b%2BQT2DBQA%3D&amp;reserved=0
>
> Changes since V1:
> - Make stop_dbg_mode return void
> - Update commit description
>
>  drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> index ca14c3ef742e..fb2d74f30448 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
> @@ -1115,7 +1115,7 @@ static int vcn_v4_0_start(struct amdgpu_device *adev)
>   *
>   * Stop VCN block with dpg mode
>   */
> -static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
> +static void vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int
> +inst_idx)
>  {
>         uint32_t tmp;
>
> @@ -1133,7 +1133,6 @@ static int vcn_v4_0_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
>         /* disable dynamic power gating mode */
>         WREG32_P(SOC15_REG_OFFSET(VCN, inst_idx, regUVD_POWER_STATUS), 0,
>                 ~UVD_POWER_STATUS__UVD_PG_MODE_MASK);
> -       return 0;
>  }
>
>  /**
> @@ -1154,7 +1153,7 @@ static int vcn_v4_0_stop(struct amdgpu_device *adev)
>                 fw_shared->sq.queue_mode |= FW_QUEUE_DPG_HOLD_OFF;
>
>                 if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
> -                       r = vcn_v4_0_stop_dpg_mode(adev, i);
> +                       vcn_v4_0_stop_dpg_mode(adev, i);
>                         continue;
>                 }
>
> --
> 2.37.1
>

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

end of thread, other threads:[~2022-08-24 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 18:34 [PATCH linux-next] drm/amdgpu/vcn: Return void from the stop_dbg_mode Khalid Masum
2022-08-15 18:34 ` Khalid Masum
2022-08-15 18:34 ` Khalid Masum
2022-08-15 18:39 ` Dong, Ruijing
2022-08-15 18:39   ` Dong, Ruijing
2022-08-15 18:39   ` Dong, Ruijing
2022-08-15 20:48   ` Alex Deucher
2022-08-15 20:48     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.