git: d4d5aed66a3f - stable/14 - 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:26:23 UTC
The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d4d5aed66a3f4323cf23f1a849b98d8570b403bf commit d4d5aed66a3f4323cf23f1a849b98d8570b403bf 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:25:17 +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) --- 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