mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 07/14] param: make string arguments to dev_add_param_fixed const
Date: Fri, 28 Nov 2014 15:28:59 +0100	[thread overview]
Message-ID: <1417184946-16128-7-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1417184946-16128-1-git-send-email-s.hauer@pengutronix.de>

dev_add_param_fixed does not modify the strings, so make them
const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 include/param.h | 4 ++--
 lib/parameter.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/param.h b/include/param.h
index b8dd9b1..53bee54 100644
--- a/include/param.h
+++ b/include/param.h
@@ -67,7 +67,7 @@ struct param_d *dev_add_param_mac(struct device_d *dev, const char *name,
 		int (*get)(struct param_d *p, void *priv),
 		u8 *mac, void *priv);
 
-int dev_add_param_fixed(struct device_d *dev, char *name, const char *value);
+int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value);
 
 void dev_remove_param(struct param_d *p);
 
@@ -161,7 +161,7 @@ static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char
 	return NULL;
 }
 
-static inline int dev_add_param_fixed(struct device_d *dev, char *name, char *value)
+static inline int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value)
 {
 	return 0;
 }
diff --git a/lib/parameter.c b/lib/parameter.c
index bcdb16b..d337ef3 100644
--- a/lib/parameter.c
+++ b/lib/parameter.c
@@ -185,7 +185,7 @@ struct param_d *dev_add_param(struct device_d *dev, const char *name,
  * @param name	The name of the parameter
  * @param value	The value of the parameter
  */
-int dev_add_param_fixed(struct device_d *dev, char *name, const char *value)
+int dev_add_param_fixed(struct device_d *dev, const char *name, const char *value)
 {
 	struct param_d *param;
 	int ret;
-- 
2.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-11-28 14:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28 14:28 [PATCH 01/14] ARM: friendlyarm-mini2440: fix compilation for some displays Sascha Hauer
2014-11-28 14:28 ` [PATCH 02/14] ARM: ep93xx: Fix typo Sascha Hauer
2014-11-28 14:28 ` [PATCH 03/14] ARM: ep93xx: let broken SoCs depend on BROKEN Sascha Hauer
2014-11-28 14:28 ` [PATCH 04/14] ARM: Let MMU depend on !CPU_ARM946E Sascha Hauer
2014-11-28 14:28 ` [PATCH 05/14] ARM: AT91: Always provide clk_set_rate stub Sascha Hauer
2014-11-28 15:23   ` Lucas Stach
2014-11-30 11:01     ` Sascha Hauer
2014-11-28 14:28 ` [PATCH 06/14] mci: mxs-mci: add f_min/f_max fields unconditionally Sascha Hauer
2014-11-28 14:28 ` Sascha Hauer [this message]
2014-11-28 14:29 ` [PATCH 08/14] fs: bpkfs: select CRC32 Sascha Hauer
2014-11-28 14:29 ` [PATCH 09/14] firmware: altera serial: depend on GENERIC_GPIO Sascha Hauer
2014-11-28 14:29 ` [PATCH 10/14] spi: mxs-spi: Allow compilation on i.MX28 only Sascha Hauer
2014-11-28 14:29 ` [PATCH 11/14] gpio: move gpio_is_valid to include/gpio.h Sascha Hauer
2014-11-28 14:29 ` [PATCH 12/14] ARM: rockchip: select PINCTRL Sascha Hauer
2014-11-28 14:29 ` [PATCH 13/14] ARM: AM335x: Select OFTREE Sascha Hauer
2014-11-28 14:29 ` [PATCH 14/14] Kconfig: make BROKEN invisible Sascha Hauer
2014-12-01  9:00   ` Michael Olbrich
2014-12-01 11:12     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417184946-16128-7-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox