mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-buf: make kobj_type structure constant
Date: Fri, 17 Feb 2023 10:47:20 +0100	[thread overview]
Message-ID: <9efa30b4-5a6d-91b3-617c-853f0ac0b22e@amd.com> (raw)
In-Reply-To: <20230217-kobj_type-dma-buf-v1-1-b84a3616522c@weissschuh.net>

Am 17.02.23 um 04:13 schrieb Thomas Weißschuh:
> 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.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Reviewed-by: Christian König <christian.koenig@amd.com>

I will pick this up for upstreaming through drm-misc-next.

Thanks,
Christian.

> ---
>   drivers/dma-buf/dma-buf-sysfs-stats.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/dma-buf-sysfs-stats.c b/drivers/dma-buf/dma-buf-sysfs-stats.c
> index fbf725fae7c1..6cfbbf0720bd 100644
> --- a/drivers/dma-buf/dma-buf-sysfs-stats.c
> +++ b/drivers/dma-buf/dma-buf-sysfs-stats.c
> @@ -112,7 +112,7 @@ static void dma_buf_sysfs_release(struct kobject *kobj)
>   	kfree(sysfs_entry);
>   }
>   
> -static struct kobj_type dma_buf_ktype = {
> +static const struct kobj_type dma_buf_ktype = {
>   	.sysfs_ops = &dma_buf_stats_sysfs_ops,
>   	.release = dma_buf_sysfs_release,
>   	.default_groups = dma_buf_stats_default_groups,
>
> ---
> base-commit: 3ac88fa4605ec98e545fb3ad0154f575fda2de5f
> change-id: 20230217-kobj_type-dma-buf-a2ea6a8a1de3
>
> Best regards,


      reply	other threads:[~2023-02-17  9:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  3:13 Thomas Weißschuh
2023-02-17  9:47 ` Christian König [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=9efa30b4-5a6d-91b3-617c-853f0ac0b22e@amd.com \
    --to=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=sumit.semwal@linaro.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

all inboxes | Powered by JetHome®