diff mbox series

fwts_modprobe: Remove unused sys_finit_module() and sys_delete_module()

Message ID 20260518070337.206512-1-thuth@redhat.com
State Accepted
Headers show
Series fwts_modprobe: Remove unused sys_finit_module() and sys_delete_module() | expand

Commit Message

Thomas Huth May 18, 2026, 7:03 a.m. UTC
From: Thomas Huth <thuth@redhat.com>

These functions are not used anymore since commit e34d0663d94387e7
("lib: modprobe: add checking the compressed zst module format").
Since they are marked as "static inline", Clang complains here:

 fwts_modprobe.c:118:19: error: unused function 'sys_finit_module'
  [-Werror,-Wunused-function]
   118 | static inline int sys_finit_module(
       |                   ^~~~~~~~~~~~~~~~
 fwts_modprobe.c:131:19: error: unused function 'sys_delete_module'
  [-Werror,-Wunused-function]
   131 | static inline int sys_delete_module(
       |                   ^~~~~~~~~~~~~~~~~

Thus let's simply delete these functions now to allow Clang to compile
this file without warnings.

Fixes: e34d0663 ("lib: modprobe: add checking the compressed zst module format")
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 src/lib/src/fwts_modprobe.c | 25 -------------------------
 1 file changed, 25 deletions(-)
diff mbox series

Patch

diff --git a/src/lib/src/fwts_modprobe.c b/src/lib/src/fwts_modprobe.c
index 8ec56a93..aa289aa3 100644
--- a/src/lib/src/fwts_modprobe.c
+++ b/src/lib/src/fwts_modprobe.c
@@ -111,31 +111,6 @@  static bool fwts_module_find(
 	return false;
 }
 
-/*
- *  sys_finit_module()
- *	system call wrapper for finit_module
- */
-static inline int sys_finit_module(
-	int fd,
-	const char *param_values,
-	int flags)
-{
-	errno = 0;
-	return syscall(__NR_finit_module, fd, param_values, flags);
-}
-
-/*
- *  sys_delete_module()
- *	system call wrapper for delete_module
- */
-static inline int sys_delete_module(
-	const char *name,
-	int flags)
-{
-	errno = 0;
-	return syscall(__NR_delete_module, name, flags);
-}
-
 /*
  *  fwts_module_loaded()
  *	check if module is loaded, the name (without .ko suffix) is