* [PATCH] axi: fix a warning
@ 2023-06-19 20:35 Sergei Antonov
2023-06-20 10:04 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Antonov @ 2023-06-19 20:35 UTC (permalink / raw)
To: u-boot; +Cc: Sergei Antonov, Mario Six
Fix an enum/integer mismatch encountered in 'sandbox_defconfig' build.
.../u-boot/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 .../u-boot/drivers/axi/axi-emul-uclass.c:14:
.../u-boot/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,
| ^~~~~~~~~~~~~~~~~~~~
Make function declaration match function definition.
Cc: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Sergei Antonov <saproj@gmail.com>
---
arch/sandbox/include/asm/axi.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/sandbox/include/asm/axi.h b/arch/sandbox/include/asm/axi.h
index d483f7b65a02..a93975c6534b 100644
--- a/arch/sandbox/include/asm/axi.h
+++ b/arch/sandbox/include/asm/axi.h
@@ -7,6 +7,8 @@
#ifndef __asm_axi_h
#define __asm_axi_h
+#include <axi.h>
+
#define axi_emul_get_ops(dev) ((struct axi_emul_ops *)(dev)->driver->ops)
/**
@@ -14,10 +16,10 @@
* @bus: The AXI bus from which to retrieve a emulation device
* @address: The address of a transfer that should be handled by a emulation
* device
- * @length: The data width of a transfer that should be handled by a emulation
+ * @size: The data width of a transfer that should be handled by a emulation
* device
* @emulp: Pointer to a buffer receiving the emulation device that handles
- * the transfer specified by the address and length parameters
+ * the transfer specified by the address and size parameters
*
* To test the AXI uclass, we implement a simple AXI emulation device, which is
* a virtual device on a AXI bus that exposes a simple storage interface: When
@@ -45,7 +47,7 @@
* Return: 0 of OK, -ENODEV if no device capable of handling the specified
* transfer exists or the device could not be retrieved
*/
-int axi_sandbox_get_emul(struct udevice *bus, ulong address, uint length,
+int axi_sandbox_get_emul(struct udevice *bus, ulong address, enum axi_size_t size,
struct udevice **emulp);
/**
* axi_get_store() - Get address of internal storage of a emulated AXI device
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] axi: fix a warning
2023-06-19 20:35 [PATCH] axi: fix a warning Sergei Antonov
@ 2023-06-20 10:04 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2023-06-20 10:04 UTC (permalink / raw)
To: Sergei Antonov; +Cc: u-boot, Mario Six
On Mon, 19 Jun 2023 at 21:36, Sergei Antonov <saproj@gmail.com> wrote:
>
> Fix an enum/integer mismatch encountered in 'sandbox_defconfig' build.
>
> .../u-boot/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 .../u-boot/drivers/axi/axi-emul-uclass.c:14:
> .../u-boot/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,
> | ^~~~~~~~~~~~~~~~~~~~
>
> Make function declaration match function definition.
>
> Cc: Mario Six <mario.six@gdsys.cc>
> Signed-off-by: Sergei Antonov <saproj@gmail.com>
> ---
> arch/sandbox/include/asm/axi.h | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-20 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 20:35 [PATCH] axi: fix a warning Sergei Antonov
2023-06-20 10:04 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox