From 215d3c274125321ea6254b59dc28996370705d5e Mon Sep 17 00:00:00 2001 From: Til Kaiser Date: Fri, 7 Feb 2025 14:26:52 +0100 Subject: [PATCH 1/3] fwctrl: include missing function declarations The fwctrl fails to build with the following error: fwctrl.c: In function 'fwctl_control_access_register': fwctrl.c:190:27: error: implicit declaration of function 'return_by_reg_status' [-Wimplicit-function-declaration] 190 | *reg_status = return_by_reg_status(cmd_status); | ^~~~~~~~~~~~~~~~~~~~ In file included from fwctrl.c:45: fwctrl.c:195:56: error: implicit declaration of function 'm_err2str' [-Wimplicit-function-declaration] 195 | reg_id, cmd_status, *reg_status, m_err2str(status)); | This commit adds the return_by_reg_status prototype to the mtcr_ul_com.h file and includes mtcr_ul_com.h and mtcr.h (where the m_err2str prototype is defined) inside fwctrl.c. Signed-off-by: Til Kaiser --- mtcr_ul/fwctrl.c | 2 ++ mtcr_ul/mtcr_ul_com.h | 2 ++ 2 files changed, 4 insertions(+) --- a/mtcr_ul/fwctrl.c +++ b/mtcr_ul/fwctrl.c @@ -40,7 +40,9 @@ #include #include #include +#include "mtcr.h" #include "mtcr_mf.h" +#include "mtcr_ul_com.h" #include "fwctrl.h" #include "fwctrl_ioctl.h" --- a/mtcr_ul/mtcr_ul_com.h +++ b/mtcr_ul/mtcr_ul_com.h @@ -165,6 +165,8 @@ int mclear_pci_semaphore_ul(const char* int mvpd_read4_ul(mfile* mf, unsigned int offset, u_int8_t value[4]); +int return_by_reg_status(int reg_status); + int space_to_cap_offset(int space); int get_dma_pages(mfile* mf, struct mtcr_page_info* page_info, int page_amount);