* [PATCH -next] drm/amdgpu: remove set but not used variable 'header'
@ 2018-09-26 14:15 YueHaibing
2018-09-29 11:16 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v3_1_ring_stop YueHaibing
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: YueHaibing @ 2018-09-26 14:15 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
Likun.Gao, David.Francis, ray.huang, Feifei.Xu, Monk.Liu
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c: In function 'amdgpu_ucode_init_bo':
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:431:39: warning:
variable 'header' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
index 1fa8bc3..afd5cf3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
@@ -428,7 +428,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
uint64_t fw_offset = 0;
int i, err;
struct amdgpu_firmware_info *ucode = NULL;
- const struct common_firmware_header *header = NULL;
if (!adev->firmware.fw_size) {
dev_warn(adev->dev, "No ip firmware need to load\n");
@@ -465,7 +464,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
for (i = 0; i < adev->firmware.max_ucodes; i++) {
ucode = &adev->firmware.ucode[i];
if (ucode->fw) {
- header = (const struct common_firmware_header *)ucode->fw->data;
amdgpu_ucode_init_single_fw(adev, ucode, adev->firmware.fw_buf_mc + fw_offset,
adev->firmware.fw_buf_ptr + fw_offset);
if (i = AMDGPU_UCODE_ID_CP_MEC1 &&
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v3_1_ring_stop
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
@ 2018-09-29 11:16 ` YueHaibing
2018-09-29 11:39 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop YueHaibing
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: YueHaibing @ 2018-09-29 11:16 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
Shaoyun.Liu, Ken.Wang, Feifei.Xu, ray.huang, evan.quan
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c: In function 'psp_v3_1_ring_stop':
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c:359:19: warning:
variable 'ring' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
index e1ebf77..cc5e3ac 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
@@ -356,12 +356,9 @@ static int psp_v3_1_ring_stop(struct psp_context *psp,
enum psp_ring_type ring_type)
{
int ret = 0;
- struct psp_ring *ring;
unsigned int psp_ring_reg = 0;
struct amdgpu_device *adev = psp->adev;
- ring = &psp->km_ring;
-
/* Write the ring destroy command to C2PMSG_64 */
psp_ring_reg = 3 << 16;
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
2018-09-29 11:16 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v3_1_ring_stop YueHaibing
@ 2018-09-29 11:39 ` YueHaibing
[not found] ` <1538221154-49213-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-10-10 19:18 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'header' Alex Deucher
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: YueHaibing @ 2018-09-29 11:39 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
Shaoyun.Liu, Ken.Wang, Feifei.Xu, ray.huang, evan.quan
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c: In function 'psp_v11_0_ring_stop':
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:309:19: warning:
variable 'ring' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index 9217af0..3f3fac2 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -306,11 +306,8 @@ static int psp_v11_0_ring_stop(struct psp_context *psp,
enum psp_ring_type ring_type)
{
int ret = 0;
- struct psp_ring *ring;
struct amdgpu_device *adev = psp->adev;
- ring = &psp->km_ring;
-
/* Write the ring destroy command to C2PMSG_64 */
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, GFX_CTRL_CMD_ID_DESTROY_RINGS);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop
[not found] ` <1538221154-49213-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2018-10-10 19:13 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2018-10-10 19:13 UTC (permalink / raw)
To: yuehaibing-hv44wF8Li93QT0dZR+AlfA
Cc: Chunming Zhou, Dave Airlie, Feifei Xu,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, LKML,
Maling list - DRI developers, Huang Rui, amd-gfx list, Deucher,
Alexander, Wang, Ken, Quan, Evan, Christian Koenig, Shaoyun Liu
On Mon, Oct 1, 2018 at 3:26 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/amd/amdgpu/psp_v11_0.c: In function 'psp_v11_0_ring_stop':
> drivers/gpu/drm/amd/amdgpu/psp_v11_0.c:309:19: warning:
> variable 'ring' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index 9217af0..3f3fac2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -306,11 +306,8 @@ static int psp_v11_0_ring_stop(struct psp_context *psp,
> enum psp_ring_type ring_type)
> {
> int ret = 0;
> - struct psp_ring *ring;
> struct amdgpu_device *adev = psp->adev;
>
> - ring = &psp->km_ring;
> -
> /* Write the ring destroy command to C2PMSG_64 */
> WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, GFX_CTRL_CMD_ID_DESTROY_RINGS);
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH -next] drm/amdgpu: remove set but not used variable 'header'
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
2018-09-29 11:16 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v3_1_ring_stop YueHaibing
2018-09-29 11:39 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop YueHaibing
@ 2018-10-10 19:18 ` Alex Deucher
2018-12-08 14:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset' YueHaibing
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2018-10-10 19:18 UTC (permalink / raw)
To: yuehaibing
Cc: Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie,
Likun Gao, David Francis, Huang Rui, Feifei Xu, monk.liu,
kernel-janitors, Maling list - DRI developers, amd-gfx list,
LKML
On Wed, Sep 26, 2018 at 11:01 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c: In function 'amdgpu_ucode_init_bo':
> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:431:39: warning:
> variable 'header' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied. Thanks,
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> index 1fa8bc3..afd5cf3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> @@ -428,7 +428,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
> uint64_t fw_offset = 0;
> int i, err;
> struct amdgpu_firmware_info *ucode = NULL;
> - const struct common_firmware_header *header = NULL;
>
> if (!adev->firmware.fw_size) {
> dev_warn(adev->dev, "No ip firmware need to load\n");
> @@ -465,7 +464,6 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
> for (i = 0; i < adev->firmware.max_ucodes; i++) {
> ucode = &adev->firmware.ucode[i];
> if (ucode->fw) {
> - header = (const struct common_firmware_header *)ucode->fw->data;
> amdgpu_ucode_init_single_fw(adev, ucode, adev->firmware.fw_buf_mc + fw_offset,
> adev->firmware.fw_buf_ptr + fw_offset);
> if (i = AMDGPU_UCODE_ID_CP_MEC1 &&
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset'
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
` (2 preceding siblings ...)
2018-10-10 19:18 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'header' Alex Deucher
@ 2018-12-08 14:53 ` YueHaibing
2018-12-10 2:48 ` Zhou, David(ChunMing)
2018-12-08 14:58 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'amdgpu_connector' YueHaibing
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: YueHaibing @ 2018-12-08 14:53 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
leo.liu, Likun.Gao, David.Panariti, shirish.s, Rex.Zhu,
andrey.grodzovsky
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_pre_soft_reset':
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4950:27: warning:
variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function 'gfx_v8_0_post_soft_reset':
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:5054:27: warning:
variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]
It never used since introduction in commit d31a501ead7f ("drm/amdgpu: add
pre_soft_reset ip func") and e4ae0fc33631 ("drm/amdgpu: implement
gfx8 post_soft_reset")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 1454fc3..8c1ba79 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4947,14 +4947,13 @@ static bool gfx_v8_0_check_soft_reset(void *handle)
static int gfx_v8_0_pre_soft_reset(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
+ u32 grbm_soft_reset = 0;
if ((!adev->gfx.grbm_soft_reset) &&
(!adev->gfx.srbm_soft_reset))
return 0;
grbm_soft_reset = adev->gfx.grbm_soft_reset;
- srbm_soft_reset = adev->gfx.srbm_soft_reset;
/* stop the rlc */
adev->gfx.rlc.funcs->stop(adev);
@@ -5051,14 +5050,13 @@ static int gfx_v8_0_soft_reset(void *handle)
static int gfx_v8_0_post_soft_reset(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
+ u32 grbm_soft_reset = 0;
if ((!adev->gfx.grbm_soft_reset) &&
(!adev->gfx.srbm_soft_reset))
return 0;
grbm_soft_reset = adev->gfx.grbm_soft_reset;
- srbm_soft_reset = adev->gfx.srbm_soft_reset;
if (REG_GET_FIELD(grbm_soft_reset, GRBM_SOFT_RESET, SOFT_RESET_CP) ||
REG_GET_FIELD(grbm_soft_reset, GRBM_SOFT_RESET, SOFT_RESET_CPF) ||
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'amdgpu_connector'
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
` (3 preceding siblings ...)
2018-12-08 14:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset' YueHaibing
@ 2018-12-08 14:58 ` YueHaibing
2019-02-26 5:48 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'vbi_time_out' YueHaibing
2019-06-27 7:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled' YueHaibing
6 siblings, 0 replies; 12+ messages in thread
From: YueHaibing @ 2018-12-08 14:58 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
Jerry.Zhang, daniels, Samuel.Li, harry.wentland,
nicholas.kazlauskas
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c: In function 'amdgpu_display_crtc_scaling_mode_fixup':
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:675:27: warning:
variable 'amdgpu_connector' set but not used [-Wunused-but-set-variable]
It never used since introduction in
commit d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 15ce7e6..30bdb67 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -672,7 +672,6 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
struct amdgpu_encoder *amdgpu_encoder;
struct drm_connector *connector;
- struct amdgpu_connector *amdgpu_connector;
u32 src_v = 1, dst_v = 1;
u32 src_h = 1, dst_h = 1;
@@ -684,7 +683,6 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
continue;
amdgpu_encoder = to_amdgpu_encoder(encoder);
connector = amdgpu_get_connector_for_encoder(encoder);
- amdgpu_connector = to_amdgpu_connector(connector);
/* set scaling */
if (amdgpu_encoder->rmx_type = RMX_OFF)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* RE: [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset'
2018-12-08 14:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset' YueHaibing
@ 2018-12-10 2:48 ` Zhou, David(ChunMing)
0 siblings, 0 replies; 12+ messages in thread
From: Zhou, David(ChunMing) @ 2018-12-10 2:48 UTC (permalink / raw)
To: YueHaibing, Deucher, Alexander, Koenig, Christian, airlied, Liu,
Leo, Gao, Likun, Panariti, David, S, Shirish, Zhu, Rex,
Grodzovsky, Andrey
Cc: kernel-janitors, dri-devel, amd-gfx, linux-kernel
> -----Original Message-----
> From: YueHaibing <yuehaibing@huawei.com>
> Sent: Saturday, December 08, 2018 11:01 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Zhou, David(ChunMing)
> <David1.Zhou@amd.com>; airlied@linux.ie; Liu, Leo <Leo.Liu@amd.com>;
> Gao, Likun <Likun.Gao@amd.com>; Panariti, David
> <David.Panariti@amd.com>; S, Shirish <Shirish.S@amd.com>; Zhu, Rex
> <Rex.Zhu@amd.com>; Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com>
> Cc: YueHaibing <yuehaibing@huawei.com>; amd-gfx@lists.freedesktop.org;
> dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; kernel-
> janitors@vger.kernel.org
> Subject: [PATCH -next] drm/amdgpu: remove set but not used variable
> 'grbm_soft_reset'
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function
> 'gfx_v8_0_pre_soft_reset':
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:4950:27: warning:
> variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c: In function
> 'gfx_v8_0_post_soft_reset':
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:5054:27: warning:
> variable 'srbm_soft_reset' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit d31a501ead7f ("drm/amdgpu: add
> pre_soft_reset ip func") and e4ae0fc33631 ("drm/amdgpu: implement
> gfx8 post_soft_reset")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 1454fc3..8c1ba79 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -4947,14 +4947,13 @@ static bool gfx_v8_0_check_soft_reset(void
> *handle) static int gfx_v8_0_pre_soft_reset(void *handle) {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> - u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
> + u32 grbm_soft_reset = 0;
>
> if ((!adev->gfx.grbm_soft_reset) &&
> (!adev->gfx.srbm_soft_reset))
> return 0;
>
> grbm_soft_reset = adev->gfx.grbm_soft_reset;
> - srbm_soft_reset = adev->gfx.srbm_soft_reset;
>
> /* stop the rlc */
> adev->gfx.rlc.funcs->stop(adev);
> @@ -5051,14 +5050,13 @@ static int gfx_v8_0_soft_reset(void *handle)
> static int gfx_v8_0_post_soft_reset(void *handle) {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> - u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
> + u32 grbm_soft_reset = 0;
>
> if ((!adev->gfx.grbm_soft_reset) &&
> (!adev->gfx.srbm_soft_reset))
> return 0;
>
> grbm_soft_reset = adev->gfx.grbm_soft_reset;
> - srbm_soft_reset = adev->gfx.srbm_soft_reset;
>
> if (REG_GET_FIELD(grbm_soft_reset, GRBM_SOFT_RESET,
> SOFT_RESET_CP) ||
> REG_GET_FIELD(grbm_soft_reset, GRBM_SOFT_RESET,
> SOFT_RESET_CPF) ||
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'vbi_time_out'
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
` (4 preceding siblings ...)
2018-12-08 14:58 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'amdgpu_connector' YueHaibing
@ 2019-02-26 5:48 ` YueHaibing
[not found] ` <20190226054828.120809-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2019-06-27 7:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled' YueHaibing
6 siblings, 1 reply; 12+ messages in thread
From: YueHaibing @ 2019-02-26 5:48 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, gustavo, keescook, Rex.Zhu, evan.quan, ray.huang
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/si_dpm.c: In function 'si_program_response_times':
drivers/gpu/drm/amd/amdgpu/si_dpm.c:4101:29: warning:
variable 'backbias_response_time' set but not used [-Wunused-but-set-variable]
It's never used since introduction in 841686df9f7d ("drm/amdgpu: add SI DPM
support (v4)"), so can be removed
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/si_dpm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index 41e01a7f57a4..d57e75e5c71f 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -4098,14 +4098,13 @@ static int si_notify_smc_display_change(struct amdgpu_device *adev,
static void si_program_response_times(struct amdgpu_device *adev)
{
- u32 voltage_response_time, backbias_response_time, acpi_delay_time, vbi_time_out;
+ u32 voltage_response_time, acpi_delay_time, vbi_time_out;
u32 vddc_dly, acpi_dly, vbi_dly;
u32 reference_clock;
si_write_smc_soft_register(adev, SI_SMC_SOFT_REGISTER_mvdd_chg_time, 1);
voltage_response_time = (u32)adev->pm.dpm.voltage_response_time;
- backbias_response_time = (u32)adev->pm.dpm.backbias_response_time;
if (voltage_response_time = 0)
voltage_response_time = 1000;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH -next] drm/amdgpu: remove set but not used variable 'vbi_time_out'
[not found] ` <20190226054828.120809-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2019-02-28 2:47 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-02-28 2:47 UTC (permalink / raw)
To: YueHaibing
Cc: Chunming Zhou, Kees Cook, Gustavo A. R. Silva, Dave Airlie,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, LKML,
Maling list - DRI developers, Huang Rui, amd-gfx list,
Daniel Vetter, Deucher, Alexander, Quan, Evan, Rex Zhu,
Christian Koenig
Applied. thanks!
On Tue, Feb 26, 2019 at 12:36 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/amd/amdgpu/si_dpm.c: In function 'si_program_response_times':
> drivers/gpu/drm/amd/amdgpu/si_dpm.c:4101:29: warning:
> variable 'backbias_response_time' set but not used [-Wunused-but-set-variable]
>
> It's never used since introduction in 841686df9f7d ("drm/amdgpu: add SI DPM
> support (v4)"), so can be removed
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/amd/amdgpu/si_dpm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> index 41e01a7f57a4..d57e75e5c71f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> @@ -4098,14 +4098,13 @@ static int si_notify_smc_display_change(struct amdgpu_device *adev,
>
> static void si_program_response_times(struct amdgpu_device *adev)
> {
> - u32 voltage_response_time, backbias_response_time, acpi_delay_time, vbi_time_out;
> + u32 voltage_response_time, acpi_delay_time, vbi_time_out;
> u32 vddc_dly, acpi_dly, vbi_dly;
> u32 reference_clock;
>
> si_write_smc_soft_register(adev, SI_SMC_SOFT_REGISTER_mvdd_chg_time, 1);
>
> voltage_response_time = (u32)adev->pm.dpm.voltage_response_time;
> - backbias_response_time = (u32)adev->pm.dpm.backbias_response_time;
>
> if (voltage_response_time = 0)
> voltage_response_time = 1000;
>
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled'
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
` (5 preceding siblings ...)
2019-02-26 5:48 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'vbi_time_out' YueHaibing
@ 2019-06-27 7:53 ` YueHaibing
[not found] ` <20190627075350.86800-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
6 siblings, 1 reply; 12+ messages in thread
From: YueHaibing @ 2019-06-27 7:53 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, harry.wentland, tianci.yin, tao.zhou1, leo.liu,
ray.huang, Jack.Xiao, Hawking.Zhang, kenneth.feng
Cc: YueHaibing, amd-gfx, dri-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/nv.c: In function 'nv_common_early_init':
drivers/gpu/drm/amd/amdgpu/nv.c:471:7: warning:
variable 'psp_enabled' set but not used [-Wunused-but-set-variable]
It's not used since inroduction in
commit c6b6a42175f5 ("drm/amdgpu: add navi10 common ip block (v3)")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/nv.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index af20ffb55c54..8b9fa3db8daa 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -468,7 +468,6 @@ static const struct amdgpu_asic_funcs nv_asic_funcs
static int nv_common_early_init(void *handle)
{
- bool psp_enabled = false;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
adev->smc_rreg = NULL;
@@ -485,10 +484,6 @@ static int nv_common_early_init(void *handle)
adev->asic_funcs = &nv_asic_funcs;
- if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP) &&
- (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP)))
- psp_enabled = true;
-
adev->rev_id = nv_get_rev_id(adev);
adev->external_rev_id = 0xff;
switch (adev->asic_type) {
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled'
[not found] ` <20190627075350.86800-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2019-08-22 2:37 ` Alex Deucher
0 siblings, 0 replies; 12+ messages in thread
From: Alex Deucher @ 2019-08-22 2:37 UTC (permalink / raw)
To: YueHaibing
Cc: Chunming Zhou, Jack Xiao, Tao Zhou, Dave Airlie, Leo Liu,
tiancyin, kernel-janitors-u79uwXL29TY76Z2rM5mHXA, LKML,
Maling list - DRI developers, Huang Rui, amd-gfx list,
Daniel Vetter, Deucher, Alexander, Kenneth Feng, Wentland, Harry,
Christian Koenig, Hawking Zhang
Applied. thanks!
Alex
On Thu, Jun 27, 2019 at 10:29 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/amd/amdgpu/nv.c: In function 'nv_common_early_init':
> drivers/gpu/drm/amd/amdgpu/nv.c:471:7: warning:
> variable 'psp_enabled' set but not used [-Wunused-but-set-variable]
>
> It's not used since inroduction in
> commit c6b6a42175f5 ("drm/amdgpu: add navi10 common ip block (v3)")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/amd/amdgpu/nv.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index af20ffb55c54..8b9fa3db8daa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -468,7 +468,6 @@ static const struct amdgpu_asic_funcs nv_asic_funcs >
> static int nv_common_early_init(void *handle)
> {
> - bool psp_enabled = false;
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> adev->smc_rreg = NULL;
> @@ -485,10 +484,6 @@ static int nv_common_early_init(void *handle)
>
> adev->asic_funcs = &nv_asic_funcs;
>
> - if (amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_PSP) &&
> - (amdgpu_ip_block_mask & (1 << AMD_IP_BLOCK_TYPE_PSP)))
> - psp_enabled = true;
> -
> adev->rev_id = nv_get_rev_id(adev);
> adev->external_rev_id = 0xff;
> switch (adev->asic_type) {
>
>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-08-22 2:37 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 14:15 [PATCH -next] drm/amdgpu: remove set but not used variable 'header' YueHaibing
2018-09-29 11:16 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v3_1_ring_stop YueHaibing
2018-09-29 11:39 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'ring' in psp_v11_0_ring_stop YueHaibing
[not found] ` <1538221154-49213-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-10-10 19:13 ` Alex Deucher
2018-10-10 19:18 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'header' Alex Deucher
2018-12-08 14:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'grbm_soft_reset' YueHaibing
2018-12-10 2:48 ` Zhou, David(ChunMing)
2018-12-08 14:58 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'amdgpu_connector' YueHaibing
2019-02-26 5:48 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'vbi_time_out' YueHaibing
[not found] ` <20190226054828.120809-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2019-02-28 2:47 ` Alex Deucher
2019-06-27 7:53 ` [PATCH -next] drm/amdgpu: remove set but not used variable 'psp_enabled' YueHaibing
[not found] ` <20190627075350.86800-1-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2019-08-22 2:37 ` 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).