[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230525201439.GA2741545@dev-arch.thelio-3990X>
Date: Thu, 25 May 2023 13:14:39 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Tom Rix <trix@...hat.com>
Cc: Felix.Kuehling@....com, alexander.deucher@....com,
christian.koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
daniel@...ll.ch, ndesaulniers@...gle.com,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] drm/amdkfd: remove unused function
get_reserved_sdma_queues_bitmap
On Thu, May 25, 2023 at 04:07:59PM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:122:24: error:
> unused function 'get_reserved_sdma_queues_bitmap' [-Werror,-Wunused-function]
> static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm)
> ^
> This function is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@...hat.com>
Caused by commit 09a95a85cf3e ("drm/amdkfd: Update SDMA queue management
for GFX9.4.3") it seems.
You can actually go a step farther and remove the
reserved_sdma_queues_bitmap member from 'struct kfd_device_info' because
it is now only assigned, never read.
$ git grep reserved_sdma_queues_bitmap next-20230525
next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device.c: kfd->device_info.reserved_sdma_queues_bitmap = 0xFULL;
next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device.c: kfd->device_info.reserved_sdma_queues_bitmap = 0x3ULL;
next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c:static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm)
next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c: return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap;
next:20230525:drivers/gpu/drm/amd/amdkfd/kfd_priv.h: uint64_t reserved_sdma_queues_bitmap;
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> index 493b4b66f180..2fbd0a96424f 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
> @@ -119,11 +119,6 @@ unsigned int get_num_xgmi_sdma_queues(struct device_queue_manager *dqm)
> dqm->dev->kfd->device_info.num_sdma_queues_per_engine;
> }
>
> -static inline uint64_t get_reserved_sdma_queues_bitmap(struct device_queue_manager *dqm)
> -{
> - return dqm->dev->kfd->device_info.reserved_sdma_queues_bitmap;
> -}
> -
> static void init_sdma_bitmaps(struct device_queue_manager *dqm)
> {
> bitmap_zero(dqm->sdma_bitmap, KFD_MAX_SDMA_QUEUES);
> --
> 2.27.0
>
Powered by blists - more mailing lists