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

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


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8cf0c810fb168d0bdb33715caf0fc05ef10cb3f0

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

    ltq-adsl-mei: fix missing-prototypes warnings
    
    * Mark some functions as static.
    * Add missing prototypes.
    
    This patch fixes the following build warnings:
    
    /home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-danube/ltq-adsl-mei/drv_mei_cpe.c:1182:1: error: no previous prototype for 'makeCMV' [-Werror=missing-prototypes]
     1182 | makeCMV (u8 opcode, u8 group, u16 address, u16 index, int size, u16 * data, u16 *CMVMSG)
          | ^~~~~~~
    /home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-danube/ltq-adsl-mei/drv_mei_cpe.c:1855:1: error: no previous prototype for 'DSL_BSP_ATMLedCBUnregister' [-Werror=missing-prototypes]
     1855 | DSL_BSP_ATMLedCBUnregister (int (*ifx_adsl_ledcallback) (void))
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-danube/ltq-adsl-mei/drv_mei_cpe.c:2448:1: error: no previous prototype for 'IFX_MEI_Ioctls' [-Werror=missing-prototypes]
     2448 | IFX_MEI_Ioctls (DSL_DEV_Device_t * pDev, int from_kernel, unsigned int command, unsigned long lon)
          | ^~~~~~~~~~~~~~
    /home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-danube/ltq-adsl-mei/drv_mei_cpe.c:2699:5: error: no previous prototype for 'ifx_mei_atm_led_blink' [-Werror=missing-prototypes]
     2699 | int ifx_mei_atm_led_blink(void)
          |     ^~~~~~~~~~~~~~~~~~~~~
    /home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xway/ltq-adsl-mei-danube/ltq-adsl-mei/drv_mei_cpe.c:2705:5: error: no previous prototype for 'ifx_mei_atm_showtime_check' [-Werror=missing-prototypes]
     2705 | int ifx_mei_atm_showtime_check(int *is_showtime, struct port_cell_info *port_cell, void **xdata_addr)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
    
    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>
---
 package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c           | 4 ++--
 package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
index 19d4007ab9..c75ece2c8e 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
+++ b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
@@ -1178,7 +1178,7 @@ DSL_BSP_AdslLedSet (DSL_DEV_Device_t * dev, DSL_DEV_LedId_t led_number, DSL_DEV_
 * \param       CMVMSG          The pointer to message buffer.
 * \ingroup     Internal
 */
-void
+static void
 makeCMV (u8 opcode, u8 group, u16 address, u16 index, int size, u16 * data, u16 *CMVMSG)
 {
         memset (CMVMSG, 0, MSG_LENGTH * 2);
@@ -2444,7 +2444,7 @@ IFX_MEI_IoctlCopyTo (int from_kernel, char *dest, char *from, int size)
 	return ret;
 }
 
-int
+static int
 IFX_MEI_Ioctls (DSL_DEV_Device_t * pDev, int from_kernel, unsigned int command, unsigned long lon)
 {
 	int i = 0;
diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h b/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
index c591bdfb22..ec4c4429ba 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
+++ b/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
@@ -618,6 +618,9 @@ extern DSL_DEV_MeiError_t DSL_BSP_Showtime(DSL_DEV_Device_t *, DSL_uint32_t, DSL
 extern int DSL_BSP_ATMLedCBRegister( int (*ifx_adsl_ledcallback)(void));
 extern DSL_DEV_MeiError_t DSL_BSP_MemoryDebugAccess(DSL_DEV_Device_t *, DSL_BSP_MemoryAccessType_t, DSL_uint32_t, DSL_uint32_t *, DSL_uint32_t);
 extern volatile DSL_DEV_Device_t *adsl_dev;
+extern int DSL_BSP_ATMLedCBUnregister (int (*ifx_adsl_ledcallback) (void));
+extern int ifx_mei_atm_led_blink(void);
+extern int ifx_mei_atm_showtime_check(int *is_showtime, struct port_cell_info *port_cell, void **xdata_addr);
 
 /**
  *    Dummy structure by now to show mechanism of extended data that will be




More information about the lede-commits mailing list