From: "Ulrich Ölmann" <u.oelmann@pengutronix.de>
To: Pengutronix Public Open-Source-Development <oss-tools@pengutronix.de>
Cc: "Ulrich Ölmann" <u.oelmann@pengutronix.de>, entwicklung@pengutronix.de
Subject: [OSS-Tools] [PATCH dt-utils 01/12] common: align declarations of dev_add_param_*() functions with barebox
Date: Sun, 3 Feb 2019 22:47:56 +0100 [thread overview]
Message-ID: <20190203214807.13643-2-u.oelmann@pengutronix.de> (raw)
In-Reply-To: <20190203214807.13643-1-u.oelmann@pengutronix.de>
The only remaining difference is the argument "value" in dev_add_param_enum()
which is of type int* in barebox and got type uint32_t* here to not let the
compiler warn about assignment of pointers of different signedness.
There is no such warning when compiling barebox as it's applying the compiler
option "-Wno-pointer-sign" in its main makefile.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
src/dt/common.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/dt/common.h b/src/dt/common.h
index de8d2938a149..c3c4f53fc216 100644
--- a/src/dt/common.h
+++ b/src/dt/common.h
@@ -368,7 +368,7 @@ struct device_d {
static inline struct param_d *dev_add_param_enum(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- int *value, const char **names, int max, void *priv)
+ uint32_t *value, const char * const *names, int max, void *priv)
{
return NULL;
@@ -377,7 +377,7 @@ static inline struct param_d *dev_add_param_enum(struct device_d *dev, const cha
static inline struct param_d *dev_add_param_bool(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- int *value, void *priv)
+ uint32_t *value, void *priv)
{
return NULL;
}
@@ -385,7 +385,7 @@ static inline struct param_d *dev_add_param_bool(struct device_d *dev, const cha
static inline struct param_d *dev_add_param_mac(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- uint8_t *mac, void *priv)
+ u8 *mac, void *priv)
{
return NULL;
}
@@ -401,7 +401,7 @@ static inline struct param_d *dev_add_param_string(struct device_d *dev, const c
static inline struct param_d *dev_add_param_uint32(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- int *value, const char *format, void *priv)
+ uint32_t *value, const char *format, void *priv)
{
return NULL;
}
--
2.20.1
_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de
next prev parent reply other threads:[~2019-02-03 21:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 21:47 [OSS-Tools] [PATCH dt-utils 00/12] Diverse patches mainly removing bugs and warnings Ulrich Ölmann
2019-02-03 21:47 ` Ulrich Ölmann [this message]
2019-02-03 21:47 ` [OSS-Tools] [PATCH dt-utils 02/12] of_get_devicepath: again correct comment Ulrich Ölmann
2019-02-03 21:47 ` [OSS-Tools] [PATCH dt-utils 03/12] barebox-state: fix usage of multiple state instances Ulrich Ölmann
2019-02-03 21:47 ` [OSS-Tools] [PATCH dt-utils 04/12] barebox-state: complete cmdline options Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 05/12] barebox-state: add cmdline option "--version" Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 06/12] barebox-state: remove declaration of __state_uint8_get() Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 07/12] barebox-state: remove unused variables Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 08/12] keystore-blob: remove unused variable Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 09/12] base64: " Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 10/12] base64: remove duplicate ‘const’ declaration specifier Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 11/12] state: fix formatting of "off_t" variables Ulrich Ölmann
2019-02-04 7:54 ` Juergen Borleis
2019-02-04 9:06 ` Uwe Kleine-König
2019-02-06 6:25 ` Ulrich Ölmann
2019-02-03 21:48 ` [OSS-Tools] [PATCH dt-utils 12/12] state: fix formatting of "uint32_t" variables Ulrich Ölmann
2019-02-07 11:43 ` [OSS-Tools] [PATCH dt-utils 00/12] Diverse patches mainly removing bugs and warnings Roland Hieber
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=20190203214807.13643-2-u.oelmann@pengutronix.de \
--to=u.oelmann@pengutronix.de \
--cc=entwicklung@pengutronix.de \
--cc=oss-tools@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