From: Alex Deucher <alexdeucher@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Jonathan Kim" <jonathan.kim@amd.com>,
"Kevin Wang" <kevin1.wang@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Felix Kuehling" <Felix.Kuehling@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Tao Zhou" <tao.zhou1@amd.com>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
shaoyunl <shaoyun.liu@amd.com>,
"John Clements" <john.clements@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>
Subject: Re: [PATCH] drm/amdgpu: use default_groups in kobj_type
Date: Fri, 7 Jan 2022 16:08:45 -0500 [thread overview]
Message-ID: <CADnq5_Mwxto+cp3MLmkWchzos8yeXaLqtJPFkZkyvWHR4_e+ug@mail.gmail.com> (raw)
In-Reply-To: <20220106095610.3275631-1-gregkh@linuxfoundation.org>
On Thu, Jan 6, 2022 at 4:56 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> There are currently 2 ways to create a set of sysfs files for a
> kobj_type, through the default_attrs field, and the default_groups
> field. Move the amdgpu sysfs code to use default_groups field which has
> been the preferred way since aa30f47cf666 ("kobject: Add support for
> default attribute groups to kobj_type") so that we can soon get rid of
> the obsolete default_attrs field.
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: "Christian König" <christian.koenig@amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> Cc: John Clements <john.clements@amd.com>
> Cc: Felix Kuehling <Felix.Kuehling@amd.com>
> Cc: Jonathan Kim <jonathan.kim@amd.com>
> Cc: Kevin Wang <kevin1.wang@amd.com>
> Cc: shaoyunl <shaoyun.liu@amd.com>
> Cc: Tao Zhou <tao.zhou1@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Applied. Thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index 567df2db23ac..94dcb004988d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -208,6 +208,7 @@ static struct attribute *amdgpu_xgmi_hive_attrs[] = {
> &amdgpu_xgmi_hive_id,
> NULL
> };
> +ATTRIBUTE_GROUPS(amdgpu_xgmi_hive);
>
> static ssize_t amdgpu_xgmi_show_attrs(struct kobject *kobj,
> struct attribute *attr, char *buf)
> @@ -237,7 +238,7 @@ static const struct sysfs_ops amdgpu_xgmi_hive_ops = {
> struct kobj_type amdgpu_xgmi_hive_type = {
> .release = amdgpu_xgmi_hive_release,
> .sysfs_ops = &amdgpu_xgmi_hive_ops,
> - .default_attrs = amdgpu_xgmi_hive_attrs,
> + .default_groups = amdgpu_xgmi_hive_groups,
> };
>
> static ssize_t amdgpu_xgmi_show_device_id(struct device *dev,
> --
> 2.34.1
>
prev parent reply other threads:[~2022-01-07 21:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 9:56 [PATCH] drm/amdgpu: use default_groups in kobj_type Greg Kroah-Hartman
2022-01-07 21:08 ` Alex Deucher [this message]
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=CADnq5_Mwxto+cp3MLmkWchzos8yeXaLqtJPFkZkyvWHR4_e+ug@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=Felix.Kuehling@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.clements@amd.com \
--cc=jonathan.kim@amd.com \
--cc=kevin1.wang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shaoyun.liu@amd.com \
--cc=tao.zhou1@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 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).