diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-05-28 23:34:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-04 15:06:28 +0200 |
commit | 5a576764e4190f7b48cf3cf40f4294f001918605 (patch) | |
tree | 8467e31ccac33478f872e136bfe3757eea9ef670 /drivers/base/cpu.c | |
parent | 7f787701b2981d1a22f3951612fbb5a97ee658d3 (diff) | |
download | linux-5a576764e4190f7b48cf3cf40f4294f001918605.tar.gz linux-5a576764e4190f7b48cf3cf40f4294f001918605.tar.bz2 linux-5a576764e4190f7b48cf3cf40f4294f001918605.zip |
drivers/base: Constify static attribute_group structs
These are only used by putting their address in an array of pointers to
const struct attribute_group (either directly or via the
__ATTRIBUTE_GROUP macro). Make them const to allow the compiler to place
them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210528213408.20067-1-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r-- | drivers/base/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 2b9e41377a07..5ef14db97904 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -175,7 +175,7 @@ static struct attribute *crash_note_cpu_attrs[] = { NULL }; -static struct attribute_group crash_note_cpu_attr_group = { +static const struct attribute_group crash_note_cpu_attr_group = { .attrs = crash_note_cpu_attrs, }; #endif @@ -475,7 +475,7 @@ static struct attribute *cpu_root_attrs[] = { NULL }; -static struct attribute_group cpu_root_attr_group = { +static const struct attribute_group cpu_root_attr_group = { .attrs = cpu_root_attrs, }; |