All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Marek Behún" <kabel@kernel.org>
Cc: linux-kernel@vger.kernel.org, "Thomas Weißschuh" <linux@weissschuh.net>
Subject: Re: [PATCH RESEND] firmware: turris-mox-rwtm: make kobj_type structure constant
Date: Fri, 07 Apr 2023 17:18:00 +0200	[thread overview]
Message-ID: <87sfdb3emv.fsf@BL-laptop> (raw)
In-Reply-To: <20230227-kobj_type-firmware-turris-v1-1-e48f65155ec5@weissschuh.net>

Thomas Weißschuh <linux@weissschuh.net> writes:

> Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
> the driver core allows the usage of const struct kobj_type.
>
> Take advantage of this to constify the structure definition to prevent
> modification at runtime.
>

Applied on mvebu/arm64

Thanks,

Gregory
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>  drivers/firmware/turris-mox-rwtm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
> index 6ea5789a89e2..2de0fb139ce1 100644
> --- a/drivers/firmware/turris-mox-rwtm.c
> +++ b/drivers/firmware/turris-mox-rwtm.c
> @@ -104,7 +104,7 @@ static void mox_kobj_release(struct kobject *kobj)
>  	kfree(to_rwtm(kobj)->kobj);
>  }
>  
> -static struct kobj_type mox_kobj_ktype = {
> +static const struct kobj_type mox_kobj_ktype = {
>  	.release	= mox_kobj_release,
>  	.sysfs_ops	= &kobj_sysfs_ops,
>  };
>
> ---
> base-commit: 2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c
> change-id: 20230227-kobj_type-firmware-turris-6cd4a66bac19
>
> Best regards,
> -- 
> Thomas Weißschuh <linux@weissschuh.net>
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

      parent reply	other threads:[~2023-04-07 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 16:27 [PATCH RESEND] firmware: turris-mox-rwtm: make kobj_type structure constant Thomas Weißschuh
2023-03-26 12:58 ` Marek Behún
2023-03-27  0:06   ` Thomas Weißschuh
2023-04-07 15:18 ` Gregory CLEMENT [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=87sfdb3emv.fsf@BL-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=kabel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    /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.