diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-02-17 20:47:00 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-02-17 20:47:00 +0000 |
| commit | 1101292a555d24c11d7630b638dc25e1ed22c061 (patch) | |
| tree | e4619fac2f08cad5ea124826f0cef87bf3941a14 | |
| parent | c7f7b67411b2ac325b548422191896cfa66d15cb (diff) | |
vchiq: Fix return type of vchiq_copy_from_user
Change the function definition to map the declaration and consistently
return an enum value. This fixes the following error reported by GCC:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:322:1: error: conflicting types for 'vchiq_copy_from_user' due to enum/integer mismatch; have 'int(void *, const void *, int)' [-Werror=enum-int-mismatch]
322 | vchiq_copy_from_user(void *dst, const void *src, int size)
| ^~~~~~~~~~~~~~~~~~~~
In file included from sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.h:38,
from sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c:61:
sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h:647:1: note: previous declaration of 'vchiq_copy_from_user' with type 'VCHIQ_STATUS_T(void *, const void *, int)'
647 | vchiq_copy_from_user(void *dst, const void *src, int size);
| ^~~~~~~~~~~~~~~~~~~~
Differential Revision: https://reviews.freebsd.org/D55163
| -rw-r--r-- | sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c index 7e105a6b3b77..57e5036ca363 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -318,7 +318,7 @@ vchiq_platform_get_arm_state(VCHIQ_STATE_T *state) return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state; } -int +VCHIQ_STATUS_T vchiq_copy_from_user(void *dst, const void *src, int size) { @@ -329,7 +329,7 @@ vchiq_copy_from_user(void *dst, const void *src, int size) else bcopy(src, dst, size); - return 0; + return VCHIQ_SUCCESS; } VCHIQ_STATUS_T |
