* [PATCH] iommu: make kobj_type structure constant
@ 2023-02-14 3:25 Thomas Weißschuh
2023-03-22 13:20 ` Joerg Roedel
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2023-02-14 3:25 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy
Cc: iommu, linux-kernel, 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>
---
drivers/iommu/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 5f6a85aea501..1dd4ec31301d 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -714,7 +714,7 @@ static void iommu_group_release(struct kobject *kobj)
kfree(group);
}
-static struct kobj_type iommu_group_ktype = {
+static const struct kobj_type iommu_group_ktype = {
.sysfs_ops = &iommu_group_sysfs_ops,
.release = iommu_group_release,
};
---
base-commit: f6feea56f66d34259c4222fa02e8171c4f2673d1
change-id: 20230214-kobj_type-iommu-9eede43d1075
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu: make kobj_type structure constant
2023-02-14 3:25 [PATCH] iommu: make kobj_type structure constant Thomas Weißschuh
@ 2023-03-22 13:20 ` Joerg Roedel
2023-03-22 22:17 ` Thomas Weißschuh
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Roedel @ 2023-03-22 13:20 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: Will Deacon, Robin Murphy, iommu, linux-kernel
On Tue, Feb 14, 2023 at 03:25:53AM +0000, Thomas Weißschuh wrote:
> 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>
> ---
Applied, thanks.
Btw, b4 reported DKIM errors checking your patch submission. Can you
check the DKIM setup on you email domain, please?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu: make kobj_type structure constant
2023-03-22 13:20 ` Joerg Roedel
@ 2023-03-22 22:17 ` Thomas Weißschuh
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2023-03-22 22:17 UTC (permalink / raw)
To: Joerg Roedel
Cc: Thomas Weißschuh, Will Deacon, Robin Murphy, iommu, linux-kernel
Hi Joerg,
Mar 22, 2023 08:20:14 Joerg Roedel <joro@8bytes.org>:
> On Tue, Feb 14, 2023 at 03:25:53AM +0000, Thomas Weißschuh wrote:
>> 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>
>> ---
>
> Applied, thanks.
Thanks!
> Btw, b4 reported DKIM errors checking your patch submission. Can you
> check the DKIM setup on you email domain, please?
Should be fixed for some time.
(After this patch, though)
Thanks for the hint!
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-22 22:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 3:25 [PATCH] iommu: make kobj_type structure constant Thomas Weißschuh
2023-03-22 13:20 ` Joerg Roedel
2023-03-22 22:17 ` Thomas Weißschuh
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.