Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

edd: make kobj_type structure constant

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>
Link: https://lore.kernel.org/r/20230227-kobj_type-firmware-edd-v1-1-c626afe5bd05@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thomas Weißschuh and committed by
Greg Kroah-Hartman
f0312cbd 1274b37a

+1 -1
+1 -1
drivers/firmware/edd.c
··· 608 608 kfree(dev); 609 609 } 610 610 611 - static struct kobj_type edd_ktype = { 611 + static const struct kobj_type edd_ktype = { 612 612 .release = edd_release, 613 613 .sysfs_ops = &edd_attr_ops, 614 614 };