aboutsummaryrefslogtreecommitdiff
path: root/drivers/axi
diff options
context:
space:
mode:
authorHeinrich Schuchardt2023-05-10 11:59:20 +0200
committerTom Rini2023-06-01 12:32:03 -0400
commitea3ee193cbeb565d66483729c3a2b61ef54178e1 (patch)
tree6c43f322e83e4910cc861db65e20fd5d20d92360 /drivers/axi
parent875ab2a27f3fed5a660d4dc3c8bc250d89baff99 (diff)
axi: fix definition of axi_sandbox_get_emul()
Compiling with gcc 13 results in an error: drivers/axi/axi-emul-uclass.c:16:5: warning: conflicting types for ‘axi_sandbox_get_emul’ due to enum/integer mismatch; have ‘int(struct udevice *, ulong, enum axi_size_t, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, enum axi_size_t, struct udevice **)’} [-Wenum-int-mismatch] 16 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, | ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/axi/axi-emul-uclass.c:14: ./arch/sandbox/include/asm/axi.h:48:5: note: previous declaration of ‘axi_sandbox_get_emul’ with type ‘int(struct udevice *, ulong, uint, struct udevice **)’ {aka ‘int(struct udevice *, long unsigned int, unsigned int, struct udevice **)’} 48 | int axi_sandbox_get_emul(struct udevice *bus, ulong address, uint length, | ^~~~~~~~~~~~~~~~~~~~ Adjust the header definition to match the implementation. Define the size parameter as constant. Fixes: 9a8bcabd8ada ("axi: Add AXI sandbox driver and simple emulator") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/axi')
-rw-r--r--drivers/axi/axi-emul-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/axi/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index 793336d8c47..e6f3ef07200 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -14,7 +14,7 @@
#include <asm/axi.h>
int axi_sandbox_get_emul(struct udevice *bus, ulong address,
- enum axi_size_t size, struct udevice **emulp)
+ const enum axi_size_t size, struct udevice **emulp)
{
struct udevice *dev;
u32 reg[2];