[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19a8be24-0b5c-4232-d3ba-dc7f269bafd3@amd.com>
Date: Mon, 12 Jun 2023 11:25:20 -0400
From: Felix Kuehling <felix.kuehling@....com>
To: Lu Hongfei <luhongfei@...o.com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
"open list:AMD KFD" <amd-gfx@...ts.freedesktop.org>,
"open list:DRM DRIVERS" <dri-devel@...ts.freedesktop.org>,
open list <linux-kernel@...r.kernel.org>,
"Kim, Jonathan" <Jonathan.Kim@....com>
Cc: opensource.kernel@...o.com
Subject: Re: [PATCH v2] gpu: drm/amd: Remove the redundant null pointer check
in list_for_each_entry() loops
[+Jon]
Am 2023-06-12 um 07:58 schrieb Lu Hongfei:
> pqn bound in list_for_each_entry loop will not be null, so there is
> no need to check whether pqn is NULL or not.
> Thus remove a redundant null pointer check.
>
> Signed-off-by: Lu Hongfei <luhongfei@...o.com>
> ---
> The filename of the previous version was:
> 0001-gpu-drm-amd-Fix-the-bug-in-list_for_each_entry-loops.patch
>
> The modifications made compared to the previous version are as follows:
> 1. Modified the patch title
> 2. "Thus remove a redundant null pointer check." is used instead of
> "We could remove this check."
>
> drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> index cd34e7aaead4..10d0cef844f0 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c
> @@ -1097,9 +1097,6 @@ void kfd_dbg_set_enabled_debug_exception_mask(struct kfd_process *target,
>
> pqm = &target->pqm;
> list_for_each_entry(pqn, &pqm->queues, process_queue_list) {
> - if (!pqn)
Right, this check doesn't make a lot of sense. Jon, was this meant to
check pqn->q?
Regards,
Felix
> - continue;
> -
> found_mask |= pqn->q->properties.exception_status;
> }
>
Powered by blists - more mailing lists