summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
authorLABBE Corentin <clabbe.montjoie@gmail.com>2015-11-13 13:31:51 +0100
committerCorey Minyard <cminyard@mvista.com>2016-01-12 22:08:49 +0100
commit99ee67351bedf23fe6b969dd94cc2847b397cd20 (patch)
tree3457af4778120d3fd538aacf20d65f286d11c8ad /drivers/char/ipmi/ipmi_msghandler.c
parentMerge tag 'dm-4.5-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/d... (diff)
downloadlinux-99ee67351bedf23fe6b969dd94cc2847b397cd20.tar.xz
linux-99ee67351bedf23fe6b969dd94cc2847b397cd20.zip
ipmi: constify some struct and char arrays
Lots of char arrays could be set as const since they contain only literal char arrays. We could in the same time make const some struct members who are pointer to those const char arrays. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index e3536da05c88..94fb407d8561 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -472,9 +472,10 @@ static DEFINE_MUTEX(smi_watchers_mutex);
#define ipmi_get_stat(intf, stat) \
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
-static char *addr_src_to_str[] = { "invalid", "hotmod", "hardcoded", "SPMI",
- "ACPI", "SMBIOS", "PCI",
- "device-tree", "default" };
+static const char * const addr_src_to_str[] = {
+ "invalid", "hotmod", "hardcoded", "SPMI", "ACPI", "SMBIOS", "PCI",
+ "device-tree", "default"
+};
const char *ipmi_addr_src_to_str(enum ipmi_addr_src src)
{