Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754025AbbKYNng (ORCPT ); Wed, 25 Nov 2015 08:43:36 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37504 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbbKYNne (ORCPT ); Wed, 25 Nov 2015 08:43:34 -0500 From: LABBE Corentin To: minyard@acm.org, openipmi-developer@lists.sourceforge.net Cc: LABBE Corentin , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] ipmi: constify the name parameter of ipmi_smi_add_proc_entry Date: Wed, 25 Nov 2015 14:43:22 +0100 Message-Id: <1448459006-6118-1-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.4.10 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1745 Lines: 44 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/