[openwrt/openwrt] ltq-vdsl-vr9-mei: fix missing prototypes warnings

LEDE Commits lede-commits at lists.infradead.org
Tue May 13 13:02:53 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/58e9780f4ce597cb38fdc5bfde865b1b944ce7ef

commit 58e9780f4ce597cb38fdc5bfde865b1b944ce7ef
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat May 10 17:19:19 2025 +0800

    ltq-vdsl-vr9-mei: fix missing prototypes warnings
    
    * Mark some functions as static.
    * Add missing prototypes.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/18744
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ltq-vdsl-vr9-mei/patches/100-compat.patch      | 11 +++--
 .../407-fix-missing-prototypes-warnings.patch      | 53 ++++++++++++++++++++++
 2 files changed, 61 insertions(+), 3 deletions(-)

diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch
index 7e7381a346..e061e68934 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch
@@ -313,17 +313,22 @@
  
  #if (MEI_EXPORT_INTERNAL_API == 1) && (MEI_DRV_ATM_PTM_INTERFACE_ENABLE == 1)
  
-@@ -59,8 +58,21 @@ extern IFX_int32_t MEI_InternalTcReset(
+@@ -58,9 +57,26 @@ extern IFX_int32_t MEI_InternalTcRequest
+ extern IFX_int32_t MEI_InternalTcReset(
                                MEI_DYN_CNTRL_T        *pMeiDynCntrl,
                                MEI_TC_Reset_t         *pArgTcReset);
- 
++struct port_cell_info;
++extern int ifx_mei_atm_showtime_check(int *is_showtime,
++                              struct port_cell_info *port_cell,
++                              void **xdata_addr);
++
 +#if 1
 +#include <lantiq_atm.h>
 +typedef enum {
 +	LTQ_MEI_SHOWTIME_ENTER,
 +	LTQ_MEI_SHOWTIME_EXIT
 +} e_ltq_mei_cb_type;
-+
+ 
 +typedef void (*ltq_mei_atm_showtime_enter_t)(IFX_uint8_t, struct port_cell_info *, void *);
 +typedef void (*ltq_mei_atm_showtime_exit_t)(IFX_uint8_t);
 +
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/407-fix-missing-prototypes-warnings.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/407-fix-missing-prototypes-warnings.patch
new file mode 100644
index 0000000000..f909e9802a
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/407-fix-missing-prototypes-warnings.patch
@@ -0,0 +1,53 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Fri, 9 May 2025 01:10:32 +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_mei_cpe-1.5.17.6/src/drv_mei_cpe_api_atm_ptm_intern.c:314:5: error: no previous prototype for 'ifx_mei_atm_led_blink' [-Werror=missing-prototypes]
+  314 | int ifx_mei_atm_led_blink(void)
+      |     ^~~~~~~~~~~~~~~~~~~~~
+/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_api_atm_ptm_intern.c:325:5: error: no previous prototype for 'ltq_ifx_mei_atm_showtime_enter_compat' [-Werror=missing-prototypes]
+  325 | int ltq_ifx_mei_atm_showtime_enter_compat(IFX_uint8_t dslLineNum,
+      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_mei_cpe-1.5.17.6/src/drv_mei_cpe_api_atm_ptm_intern.c:334:5: error: no previous prototype for 'ltq_ifx_mei_atm_showtime_exit_compat' [-Werror=missing-prototypes]
+  334 | int ltq_ifx_mei_atm_showtime_exit_compat(IFX_uint8_t dslLineNum) {
+      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ src/drv_mei_cpe_api_atm_ptm_intern.c | 4 ++--
+ src/drv_mei_cpe_api_atm_ptm_intern.h | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/src/drv_mei_cpe_api_atm_ptm_intern.c
++++ b/src/drv_mei_cpe_api_atm_ptm_intern.c
+@@ -322,7 +322,7 @@ int ifx_mei_atm_led_blink(void)
+ int (*ifx_mei_atm_showtime_enter)(struct port_cell_info *, void *) = NULL;
+ int (*ifx_mei_atm_showtime_exit)(void) = NULL;
+ 
+-int ltq_ifx_mei_atm_showtime_enter_compat(IFX_uint8_t dslLineNum,
++static int ltq_ifx_mei_atm_showtime_enter_compat(IFX_uint8_t dslLineNum,
+ 				      struct port_cell_info *cellInfo,
+ 				      void *xdata) {
+ 	if (ifx_mei_atm_showtime_enter)
+@@ -331,7 +331,7 @@ int ltq_ifx_mei_atm_showtime_enter_compa
+ 	return -e_MEI_ERR_OP_FAILED;
+ }
+ 
+-int ltq_ifx_mei_atm_showtime_exit_compat(IFX_uint8_t dslLineNum) {
++static int ltq_ifx_mei_atm_showtime_exit_compat(IFX_uint8_t dslLineNum) {
+ 	if (ifx_mei_atm_showtime_exit)
+ 		return ifx_mei_atm_showtime_exit();
+ 
+--- a/src/drv_mei_cpe_api_atm_ptm_intern.h
++++ b/src/drv_mei_cpe_api_atm_ptm_intern.h
+@@ -61,6 +61,7 @@ struct port_cell_info;
+ extern int ifx_mei_atm_showtime_check(int *is_showtime,
+                               struct port_cell_info *port_cell,
+                               void **xdata_addr);
++extern int ifx_mei_atm_led_blink(void);
+ 
+ #if 1
+ #include <lantiq_atm.h>




More information about the lede-commits mailing list