Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 861D8C433F5 for ; Fri, 7 Jan 2022 21:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229744AbiAGVI6 (ORCPT ); Fri, 7 Jan 2022 16:08:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiAGVI5 (ORCPT ); Fri, 7 Jan 2022 16:08:57 -0500 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08AEFC061574 for ; Fri, 7 Jan 2022 13:08:57 -0800 (PST) Received: by mail-oi1-x235.google.com with SMTP id w80so9901204oie.9 for ; Fri, 07 Jan 2022 13:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=O7pvSOfIkV4dqbPfuv/2HOh0xU+VB9JiCav0R4FD6b4=; b=pr418NVHAUExpVkYCuuatPAeH6dxKsAdEKvI0rruXEbnOAk1Lj5AVEaq989nHFeUP8 xFXlhLn9+/zsAiLiBpNCuk/bu+LDmSXRqEUKrwmXopsHTlWrM/g8pmJFPlTb2UktTcWr JqGGSfdJ4qMpZSig3S1uwVD4RBOfLcbRmilmvSlg5EPM6SHY3VdPHEicCzSZm027pzuz XLfEmyV48472KMtvVCa6qRclsTAKT4HXpNFmqqkk0eMFXEoA3U3sWRMBSaPFCqAzlujY 5uNx2OIq8a4bjewwDKJ2rZNWs0eRbtYpB98v/XGOckHWULrSUB+AhAgj0MmZbvmCXgG2 YXyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=O7pvSOfIkV4dqbPfuv/2HOh0xU+VB9JiCav0R4FD6b4=; b=hT0z/A8p5jzbpcG+aB/B7KW/3XruIw7o5VUZjc0IK2lNxEIZckyXwnC3wcR3AiPVhh M6W11Lm5r+DRARxBxq+STGEoBOe7F0LdH5s/9Zwmroo0EF0pt5L1Q/Pq9WjO/QRe0X7z SuJTwAR5q0IzmOhnjLqJzW+ny1HgmzYODwtV6kfXRuSs8MTOyMoxlK8u3mohxEMDmHiz NfECuO91xX9D72vX20a0I+Lzv5X7VG0ZD+18/+LVIKyO98wGTaoQwHJ9nFXSkpmlaY4Q NHkXQFGkk7rwBK5ynOMlre8RAMAhC2h4MxpFVPn9S5O0YrFMesRnBqPX1zf+xZFi52Yb FUSg== X-Gm-Message-State: AOAM533aKa5jDjuKLBwwQNPsQZgZ5oF4i90i4MTGEAtfuRiL0Fuwujb5 hXFb1aES/KWZ+rCgP6tEdd2c9WHXMmnrCEHS2ns= X-Google-Smtp-Source: ABdhPJz/BW/3gQ7COMiFX5lVTDRtnXMjaMVu4RoviTgP8z3CUc0YhYzZKKZOXmlZyqFiTsL0pwvkpb21SPSJvzf4f90= X-Received: by 2002:a05:6808:68f:: with SMTP id k15mr10755798oig.5.1641589736048; Fri, 07 Jan 2022 13:08:56 -0800 (PST) MIME-Version: 1.0 References: <20220106095610.3275631-1-gregkh@linuxfoundation.org> In-Reply-To: <20220106095610.3275631-1-gregkh@linuxfoundation.org> From: Alex Deucher Date: Fri, 7 Jan 2022 16:08:45 -0500 Message-ID: Subject: Re: [PATCH] drm/amdgpu: use default_groups in kobj_type To: Greg Kroah-Hartman Cc: LKML , Jonathan Kim , Kevin Wang , David Airlie , Felix Kuehling , "Pan, Xinhui" , Tao Zhou , amd-gfx list , Maling list - DRI developers , Alex Deucher , shaoyunl , John Clements , =?UTF-8?Q?Christian_K=C3=B6nig?= , Hawking Zhang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 6, 2022 at 4:56 AM Greg Kroah-Hartman 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 > Cc: "Christian K=C3=B6nig" > Cc: "Pan, Xinhui" > Cc: David Airlie > Cc: Daniel Vetter > Cc: Hawking Zhang > Cc: John Clements > Cc: Felix Kuehling > Cc: Jonathan Kim > Cc: Kevin Wang > Cc: shaoyunl > Cc: Tao Zhou > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Greg Kroah-Hartman 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/a= md/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[] =3D= { > &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 = =3D { > struct kobj_type amdgpu_xgmi_hive_type =3D { > .release =3D amdgpu_xgmi_hive_release, > .sysfs_ops =3D &amdgpu_xgmi_hive_ops, > - .default_attrs =3D amdgpu_xgmi_hive_attrs, > + .default_groups =3D amdgpu_xgmi_hive_groups, > }; > > static ssize_t amdgpu_xgmi_show_device_id(struct device *dev, > -- > 2.34.1 >