git: f0edd08b27d7 - stable/13 - LinuxKPI: Remove the temporary variable fileid from the macro request_module
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Apr 2024 11:28:10 UTC
The branch stable/13 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=f0edd08b27d78a27a05e16c894a4cafa1fc386e3
commit f0edd08b27d78a27a05e16c894a4cafa1fc386e3
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-04-05 16:26:09 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-04-12 11:27:13 +0000
LinuxKPI: Remove the temporary variable fileid from the macro request_module
The variable fileid stores the result from kern_kldload() but never gets
used. Since the third parameter `*fileid` of kern_kldload() can be NULL,
this unused variable can be safely removed.
No functional change intended.
Reviewed by: emaste, bz, #linuxkpi
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D44583
(cherry picked from commit 317cc829ee227cfdffe7b25125c070112ce0c2f1)
(cherry picked from commit d4d5aed66a3f4323cf23f1a849b98d8570b403bf)
---
sys/compat/linuxkpi/common/include/linux/kmod.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/kmod.h b/sys/compat/linuxkpi/common/include/linux/kmod.h
index 278d64db9df3..b3cbe2ed2e02 100644
--- a/sys/compat/linuxkpi/common/include/linux/kmod.h
+++ b/sys/compat/linuxkpi/common/include/linux/kmod.h
@@ -39,9 +39,8 @@
#define request_module(...) \
({\
char modname[128]; \
- int fileid; \
snprintf(modname, sizeof(modname), __VA_ARGS__); \
- kern_kldload(curthread, modname, &fileid); \
+ kern_kldload(curthread, modname, NULL); \
})
#define request_module_nowait request_module