From: Ma Jun <Jun.Ma2@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Kenneth.Feng@amd.com>, <Alexander.Deucher@amd.com>,
<kevinyang.wang@amd.com>, <lijo.lazar@amd.com>,
Ma Jun <Jun.Ma2@amd.com>
Subject: [PATCH] drm/amdgpu/pm: Remove gpu_od if it's an empty directory
Date: Wed, 17 Apr 2024 13:53:35 +0800 [thread overview]
Message-ID: <20240417055335.118441-1-Jun.Ma2@amd.com> (raw)
gpu_od should be removed if it's an empty directory
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reported-by: Yang Wang <kevinyang.wang@amd.com>
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index a20e03e69d38..0c13e5520e77 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -4338,6 +4338,13 @@ static int amdgpu_od_set_init(struct amdgpu_device *adev)
}
}
+ /*
+ * If gpu_od is the first member in the list, that means gpu_od is an
+ * empty directory, so remove it.
+ */
+ if (list_is_first(&top_set->entry, &adev->pm.od_kobj_list))
+ goto err_out;
+
return 0;
err_out:
--
2.34.1
next reply other threads:[~2024-04-17 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 5:53 Ma Jun [this message]
2024-04-17 6:06 ` [PATCH] drm/amdgpu/pm: Remove gpu_od if it's an empty directory Wang, Yang(Kevin)
2024-04-17 11:52 ` Lazar, Lijo
2024-04-18 1:21 ` Ma, Jun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240417055335.118441-1-Jun.Ma2@amd.com \
--to=jun.ma2@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Kenneth.Feng@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=kevinyang.wang@amd.com \
--cc=lijo.lazar@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.