Date: Fri, 24 Apr 2026 17:55:59 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d17f7f9e911a - stable/15 - vchiq: Fix return type of vchiq_copy_from_user Message-ID: <69ebaeaf.1c4dd.42086423@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d17f7f9e911ad77ac14cb2974935c57931a7720b commit d17f7f9e911ad77ac14cb2974935c57931a7720b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-02-17 20:47:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-04-24 15:37:25 +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 (cherry picked from commit 1101292a555d24c11d7630b638dc25e1ed22c061) --- 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 0150ce72f0a4..8e30e1c38b6d 100644 --- a/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c +++ b/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c @@ -255,7 +255,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) { @@ -266,7 +266,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?69ebaeaf.1c4dd.42086423>
