From d80179baf828c8086edf68fa83ff67ab93d9a638 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Fri, 4 Jan 2019 16:16:44 +0100 Subject: common: state: fix alignment Fixes: 7126dffd0be ("common: state: Add variable_type to state_variable") Signed-off-by: Roland Hieber Signed-off-by: Sascha Hauer --- common/state/state_variables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/state/state_variables.c b/common/state/state_variables.c index 269d175874..50cffba700 100644 --- a/common/state/state_variables.c +++ b/common/state/state_variables.c @@ -132,7 +132,7 @@ static struct state_variable *state_uint8_create(struct state *state, static struct state_variable *state_uint32_create(struct state *state, const char *name, struct device_node *node, - const struct variable_type *vtype) + const struct variable_type *vtype) { struct state_uint32 *su32; struct param_d *param; @@ -223,7 +223,7 @@ static int state_enum32_import(struct state_variable *sv, static struct state_variable *state_enum32_create(struct state *state, const char *name, struct device_node *node, - const struct variable_type *vtype) + const struct variable_type *vtype) { struct state_enum32 *enum32; int ret, i, num_names; @@ -307,7 +307,7 @@ static int state_mac_import(struct state_variable *sv, struct device_node *node) static struct state_variable *state_mac_create(struct state *state, const char *name, struct device_node *node, - const struct variable_type *vtype) + const struct variable_type *vtype) { struct state_mac *mac; int ret; @@ -409,7 +409,7 @@ static int state_string_get(struct param_d *p, void *priv) static struct state_variable *state_string_create(struct state *state, const char *name, struct device_node *node, - const struct variable_type *vtype) + const struct variable_type *vtype) { struct state_string *string; uint32_t start_size[2]; -- cgit v1.2.3 From b3501cf81ba3ca6dafba7853a32a7b4d7f658de2 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Mon, 7 Jan 2019 15:43:33 +0100 Subject: common: state: fix another alignment Fixes: 7126dffd0be ("common: state: Add variable_type to state_variable") Fixes: 6096a0cfa4a ("common: state: fix alignment") Signed-off-by: Roland Hieber Signed-off-by: Sascha Hauer --- common/state/state_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/state/state_variables.c b/common/state/state_variables.c index 50cffba700..6a00c82203 100644 --- a/common/state/state_variables.c +++ b/common/state/state_variables.c @@ -102,7 +102,7 @@ static int state_uint8_set(struct param_d *p, void *priv) static struct state_variable *state_uint8_create(struct state *state, const char *name, struct device_node *node, - const struct variable_type *vtype) + const struct variable_type *vtype) { struct state_uint32 *su32; struct param_d *param; -- cgit v1.2.3 From f91a993e39f43bf78e9723cec207fd03cf4867d9 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 8 Jan 2019 20:09:02 -0800 Subject: memory_display: Fix type of argument passed to %*s On AArch64, pointer arithmetic in (pos - line) resolves into "long int", whereas "%*s" is expecting regular "int". Add explicit cast to avoid compiler warnings. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- common/memory_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/memory_display.c b/common/memory_display.c index cd0eadf88d..fbb8bbb6fa 100644 --- a/common/memory_display.c +++ b/common/memory_display.c @@ -96,7 +96,7 @@ int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbyte offs += size; } - pos += sprintf(pos, "%*s", 61 - (pos - line), ""); + pos += sprintf(pos, "%*s", (int)(61 - (pos - line)), ""); cp = linebuf; for (i = 0; i < linebytes; i++) { -- cgit v1.2.3