From e130308299da810dfba46e04458d2845ca7df278 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sat, 10 May 2025 17:19:18 +0800 Subject: [PATCH] ltq-tapi: fix missing-prototypes build warnings Mark some functions as static. Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/18744 Signed-off-by: Robert Marko --- .../616-fix-missing-prototypes-warnings.patch | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 package/kernel/lantiq/ltq-tapi/patches/616-fix-missing-prototypes-warnings.patch diff --git a/package/kernel/lantiq/ltq-tapi/patches/616-fix-missing-prototypes-warnings.patch b/package/kernel/lantiq/ltq-tapi/patches/616-fix-missing-prototypes-warnings.patch new file mode 100644 index 00000000000..c0ecb42116e --- /dev/null +++ b/package/kernel/lantiq/ltq-tapi/patches/616-fix-missing-prototypes-warnings.patch @@ -0,0 +1,56 @@ +From: Shiji Yang +Date: Thu, 8 May 2025 23:30:39 +0800 +Subject: [PATCH] fix missing prototypes warnings + +This patch fixes various missing-prototypes build warnings on +6.12 kernel: + +/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_tapi-3.13.0/src/drv_tapi_event.c:2815:13: error: no previous prototype for 'IFX_TAPI_EventWrpBufferPool_ElementCountGet' [-Werror=missing-prototypes] + 2815 | IFX_int32_t IFX_TAPI_EventWrpBufferPool_ElementCountGet(IFX_void_t) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_tapi-3.13.0/src/drv_tapi_event.c:2844:13: error: no previous prototype for 'IFX_TAPI_EventWrpBufferPool_ElementAvailCountGet' [-Werror=missing-prototypes] + 2844 | IFX_int32_t IFX_TAPI_EventWrpBufferPool_ElementAvailCountGet(IFX_void_t) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_tapi-3.13.0/src/drv_tapi_fxo.c:145:13: error: no previous prototype for 'TAPI_FXO_DAA_Ioctl' [-Werror=missing-prototypes] + 145 | IFX_int32_t TAPI_FXO_DAA_Ioctl (TAPI_CHANNEL *pChannel, + | ^~~~~~~~~~~~~~~~~~ +/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_tapi-3.13.0/src/drv_tapi_fxo.c:291:13: error: no previous prototype for 'TAPI_FXO_SmartSlic_Ioctl' [-Werror=missing-prototypes] + 291 | IFX_int32_t TAPI_FXO_SmartSlic_Ioctl(TAPI_CHANNEL *pChannel, + | ^~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Shiji Yang +--- + src/drv_tapi_event.h | 3 +++ + src/drv_tapi_fxo.c | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +--- a/src/drv_tapi_event.h ++++ b/src/drv_tapi_event.h +@@ -24,4 +24,7 @@ + #define IFX_EVENT_DISABLE 1 + #define IFX_EVENT_ENABLE 0 + ++IFX_int32_t IFX_TAPI_EventWrpBufferPool_ElementCountGet(IFX_void_t); ++IFX_int32_t IFX_TAPI_EventWrpBufferPool_ElementAvailCountGet(IFX_void_t); ++ + #endif /* _DRV_TAPIEVENT_H */ +--- a/src/drv_tapi_fxo.c ++++ b/src/drv_tapi_fxo.c +@@ -142,7 +142,7 @@ IFX_return_t IFX_TAPI_FXO_Event_Dispatch + \remarks + This function is called if DAA TAPI plugin is used for FXO handling. + */ +-IFX_int32_t TAPI_FXO_DAA_Ioctl (TAPI_CHANNEL *pChannel, ++static IFX_int32_t TAPI_FXO_DAA_Ioctl (TAPI_CHANNEL *pChannel, + IFX_uint32_t cmd, + IFX_ulong_t arg) + { +@@ -288,7 +288,7 @@ IFX_int32_t TAPI_FXO_DAA_Ioctl (TAPI_CHA + This function is called if LL driver is used for FXO ioctl handling. + Used on systems which have SmartSLIC with fused FXO line(s). + */ +-IFX_int32_t TAPI_FXO_SmartSlic_Ioctl(TAPI_CHANNEL *pChannel, ++static IFX_int32_t TAPI_FXO_SmartSlic_Ioctl(TAPI_CHANNEL *pChannel, + IFX_uint32_t cmd, + IFX_ulong_t arg) + {