mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc@eso.teric.us>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: [PATCH RESEND] parameter: fix build warning when !CONFIG_PARAMETER
Date: Tue, 19 Mar 2013 10:22:48 -0500	[thread overview]
Message-ID: <20130327130025.7FF1725817@kryptos.localdomain> (raw)
In-Reply-To: <20130327083109.GP1906@pengutronix.de>

Commit 51f2ded17c35c146488f6f3b697764bb2953a156 ("param: make return
value of param getter function const") made the parameter getter const,
but neglected to change the dev_add_param() function prototype in the
!CONFIG_PARAMETER case.

Fixes the following warning with CONFIG_NAND and !CONFIG_PARAMETER:

drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':
drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default]
include/param.h:59:19: note: expected 'char * (*)(struct device_d *, struct param_d *)' but argument is of type 'const char * (*)(struct device_d *, struct param_d *)'

Signed-off-by: Josh Cartwright <joshc@eso.teric.us>
---
Sorry again for then noise!

 include/param.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/param.h b/include/param.h
index 21f4f7d..3a585cd 100644
--- a/include/param.h
+++ b/include/param.h
@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,
 
 static inline int dev_add_param(struct device_d *dev, char *name,
 		int (*set)(struct device_d *dev, struct param_d *p, const char *val),
-		char *(*get)(struct device_d *, struct param_d *p),
+		const char *(*get)(struct device_d *, struct param_d *p),
 		unsigned long flags)
 {
 	return 0;
-- 
1.8.1.5


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

  reply	other threads:[~2013-03-27 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 23:26 [PATCH] macb: rename platform data Josh Cartwright
2013-03-19 15:54 ` Josh Cartwright
2013-03-25  9:12   ` Sascha Hauer
2013-03-26 15:21     ` Josh Cartwright
2013-03-27  8:31       ` Sascha Hauer
2013-03-19 15:22         ` Josh Cartwright [this message]
2013-04-02  6:29           ` [PATCH RESEND] parameter: fix build warning when !CONFIG_PARAMETER 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=20130327130025.7FF1725817@kryptos.localdomain \
    --to=joshc@eso.teric.us \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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