diff options
author | Joel Stanley <joel@jms.id.au> | 2018-05-04 11:40:36 +0930 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-05-04 03:25:05 -0500 |
commit | 854bf69e1c7df94edd3b97266739623e85098496 (patch) | |
tree | 97f9a9bb9924427e8fad58f0af6633497e825d1c | |
parent | cd2c3b097e21548788c2ffd82a428c62fdc929a7 (diff) | |
download | skiboot-854bf69e1c7df94edd3b97266739623e85098496.zip skiboot-854bf69e1c7df94edd3b97266739623e85098496.tar.gz skiboot-854bf69e1c7df94edd3b97266739623e85098496.tar.bz2 |
fsp: Fix msg vaargs usage
hw/fsp/fsp.c:1011:17: warning: passing an object that undergoes default argument promotion to
'va_start' has undefined behavior [-Wvarargs]
va_start(list, add_words);
^
hw/fsp/fsp.c:1007:59: note: parameter of type 'u8' (aka 'unsigned char') is declared here
void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...)
^
[CC] platforms/ibm-fsp/apollo-pci.o
hw/fsp/fsp.c:1026:17: warning: passing an object that undergoes default argument promotion to
'va_start' has undefined behavior [-Wvarargs]
va_start(list, add_words);
^
hw/fsp/fsp.c:1016:47: note: parameter of type 'u8' (aka 'unsigned char') is declared here
struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...)
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | hw/fsp/fsp.c | 4 | ||||
-rw-r--r-- | include/fsp.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c index 4a04d00..4beb330 100644 --- a/hw/fsp/fsp.c +++ b/hw/fsp/fsp.c @@ -1004,7 +1004,7 @@ static void __fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, va_end(list); } -void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...) +void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u32 add_words, ...) { va_list list; @@ -1013,7 +1013,7 @@ void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...) va_end(list); } -struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...) +struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u32 add_words, ...) { struct fsp_msg *msg = fsp_allocmsg(!!(cmd_sub_mod & 0x1000000)); va_list list; diff --git a/include/fsp.h b/include/fsp.h index 9b96d5d..ee851ec 100644 --- a/include/fsp.h +++ b/include/fsp.h @@ -671,10 +671,10 @@ extern bool fsp_present(void); * instead as we will eventually use pre-allocated message pools */ extern struct fsp_msg *fsp_allocmsg(bool alloc_response) __warn_unused_result; -extern struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u8 add_words, ...) __warn_unused_result; +extern struct fsp_msg *fsp_mkmsg(u32 cmd_sub_mod, u32 add_words, ...) __warn_unused_result; /* Populate a pre-allocated msg */ -extern void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u8 add_words, ...); +extern void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u32 add_words, ...); /* Free a message * |