The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Cc: Justin Ernst <justin.ernst@hpe.com>,
	Mark Gross <markgross@kernel.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] x86/platform/uv: use default_groups in kobj_type
Date: Thu, 30 Dec 2021 19:34:10 +0100	[thread overview]
Message-ID: <f47f24a1-bd34-4a30-959f-962c9df6afc6@redhat.com> (raw)
In-Reply-To: <20211229141332.2552428-1-gregkh@linuxfoundation.org>

Hi,

On 12/29/21 15:13, 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 uv 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: Justin Ernst <justin.ernst@hpe.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Mark Gross <markgross@kernel.org>
> Cc: platform-driver-x86@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans

> ---
>  drivers/platform/x86/uv_sysfs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c
> index 956a354b57c1..625b0b79d185 100644
> --- a/drivers/platform/x86/uv_sysfs.c
> +++ b/drivers/platform/x86/uv_sysfs.c
> @@ -175,6 +175,7 @@ static struct attribute *uv_hub_attrs[] = {
>  	&cnode_attribute.attr,
>  	NULL,
>  };
> +ATTRIBUTE_GROUPS(uv_hub);
>  
>  static void hub_release(struct kobject *kobj)
>  {
> @@ -205,7 +206,7 @@ static const struct sysfs_ops hub_sysfs_ops = {
>  static struct kobj_type hub_attr_type = {
>  	.release	= hub_release,
>  	.sysfs_ops	= &hub_sysfs_ops,
> -	.default_attrs	= uv_hub_attrs,
> +	.default_groups	= uv_hub_groups,
>  };
>  
>  static int uv_hubs_init(void)
> @@ -327,6 +328,7 @@ static struct attribute *uv_port_attrs[] = {
>  	&uv_port_conn_port_attribute.attr,
>  	NULL,
>  };
> +ATTRIBUTE_GROUPS(uv_port);
>  
>  static void uv_port_release(struct kobject *kobj)
>  {
> @@ -357,7 +359,7 @@ static const struct sysfs_ops uv_port_sysfs_ops = {
>  static struct kobj_type uv_port_attr_type = {
>  	.release	= uv_port_release,
>  	.sysfs_ops	= &uv_port_sysfs_ops,
> -	.default_attrs	= uv_port_attrs,
> +	.default_groups	= uv_port_groups,
>  };
>  
>  static int uv_ports_init(void)
> 


      reply	other threads:[~2021-12-30 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29 14:13 [PATCH] x86/platform/uv: use default_groups in kobj_type Greg Kroah-Hartman
2021-12-30 18:34 ` Hans de Goede [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=f47f24a1-bd34-4a30-959f-962c9df6afc6@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=justin.ernst@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /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