Date: Tue, 17 Feb 2026 20:48:15 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 1101292a555d - main - vchiq: Fix return type of vchiq_copy_from_user Message-ID: <6994d40f.1ffc3.2b6e266f@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1101292a555d24c11d7630b638dc25e1ed22c061 commit 1101292a555d24c11d7630b638dc25e1ed22c061 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-02-17 20:47:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-02-17 20:47:00 +0000 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 --- sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- 1 file 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_Thome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6994d40f.1ffc3.2b6e266f>
