Skip to content

Commit 7214b32

Browse files
t-8chbp3tk0v
authored andcommitted
x86/MCE/AMD: Make kobj_type structure constant
Since ee6d3dd ("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> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230217-kobj_type-mce-amd-v1-1-40ef94816444@weissschuh.net
1 parent fe15c26 commit 7214b32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • arch/x86/kernel/cpu/mce

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ static const struct sysfs_ops threshold_ops = {
10291029

10301030
static void threshold_block_release(struct kobject *kobj);
10311031

1032-
static struct kobj_type threshold_ktype = {
1032+
static const struct kobj_type threshold_ktype = {
10331033
.sysfs_ops = &threshold_ops,
10341034
.default_groups = default_groups,
10351035
.release = threshold_block_release,

0 commit comments

Comments
 (0)