mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] ipmi: constify the name parameter of ipmi_smi_add_proc_entry
@ 2015-11-25 13:43 LABBE Corentin
  2015-11-25 13:43 ` [PATCH 2/4] ipmi: constify the reason parameter of start_error_recovery LABBE Corentin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: LABBE Corentin @ 2015-11-25 13:43 UTC (permalink / raw)
  To: minyard, openipmi-developer; +Cc: LABBE Corentin, linux-kernel

The name parameter of ipmi_smi_add_proc_entry() is never modified.
Furthermore, the name parameter of ipmi_smi_add_proc_entry is always given
string literal.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
 drivers/char/ipmi/ipmi_msghandler.c | 2 +-
 include/linux/ipmi_smi.h            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 94fb407..ff64600 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2121,7 +2121,7 @@ static const struct file_operations smi_stats_proc_ops = {
 };
 #endif /* CONFIG_PROC_FS */
 
-int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
+int ipmi_smi_add_proc_entry(ipmi_smi_t smi, const char *name,
 			    const struct file_operations *proc_ops,
 			    void *data)
 {
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h
index f8cea14..4ceabae 100644
--- a/include/linux/ipmi_smi.h
+++ b/include/linux/ipmi_smi.h
@@ -245,7 +245,7 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg)
 /* Allow the lower layer to add things to the proc filesystem
    directory for this interface.  Note that the entry will
    automatically be dstroyed when the interface is destroyed. */
-int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
+int ipmi_smi_add_proc_entry(ipmi_smi_t smi, const char *name,
 			    const struct file_operations *proc_ops,
 			    void *data);
 
-- 
2.4.10


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-25 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 13:43 [PATCH 1/4] ipmi: constify the name parameter of ipmi_smi_add_proc_entry LABBE Corentin
2015-11-25 13:43 ` [PATCH 2/4] ipmi: constify the reason parameter of start_error_recovery LABBE Corentin
2015-11-25 13:43 ` [PATCH 4/4] ipmi: replace simple_strtoul by kstrtox LABBE Corentin
2015-11-25 14:29 ` [PATCH 3/4] ipmi: Replace all printk(KERN_xxx by their pr_xxx counterpart LABBE Corentin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®