* [PATCH] drm/amdgpu: remove unused variable num_xcc
@ 2023-05-22 12:30 Tom Rix
2023-05-22 15:10 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-05-22 12:30 UTC (permalink / raw
To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
Hawking.Zhang, le.ma, lijo.lazar, tao.zhou1, shiwu.zhang
Cc: amd-gfx, dri-devel, linux-kernel, Tom Rix
gcc with W=1 reports
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable
‘num_xcc’ set but not used [-Werror=unused-but-set-variable]
2138 | int num_xcc;
| ^~~~~~~
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index e5cfb3adb3b3..63718cf02aa1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -2135,9 +2135,6 @@ static void gfx_v9_4_3_ring_emit_gds_switch(struct amdgpu_ring *ring,
static int gfx_v9_4_3_early_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- int num_xcc;
-
- num_xcc = NUM_XCC(adev->gfx.xcc_mask);
adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
AMDGPU_MAX_COMPUTE_RINGS);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: remove unused variable num_xcc
2023-05-22 12:30 [PATCH] drm/amdgpu: remove unused variable num_xcc Tom Rix
@ 2023-05-22 15:10 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2023-05-22 15:10 UTC (permalink / raw
To: Tom Rix
Cc: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
Hawking.Zhang, le.ma, lijo.lazar, tao.zhou1, shiwu.zhang,
dri-devel, amd-gfx, linux-kernel
Applied. Thanks!
Alex
On Mon, May 22, 2023 at 8:30 AM Tom Rix <trix@redhat.com> wrote:
>
> gcc with W=1 reports
> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable
> ‘num_xcc’ set but not used [-Werror=unused-but-set-variable]
> 2138 | int num_xcc;
> | ^~~~~~~
>
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> index e5cfb3adb3b3..63718cf02aa1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> @@ -2135,9 +2135,6 @@ static void gfx_v9_4_3_ring_emit_gds_switch(struct amdgpu_ring *ring,
> static int gfx_v9_4_3_early_init(void *handle)
> {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> - int num_xcc;
> -
> - num_xcc = NUM_XCC(adev->gfx.xcc_mask);
>
> adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
> AMDGPU_MAX_COMPUTE_RINGS);
> --
> 2.27.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-22 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 12:30 [PATCH] drm/amdgpu: remove unused variable num_xcc Tom Rix
2023-05-22 15:10 ` 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 read-only IMAP folder(s) and NNTP newsgroup(s).