git: 317cc829ee22 - main - LinuxKPI: Remove the temporary variable fileid from the macro request_module

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Fri, 05 Apr 2024 16:26:53 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=317cc829ee227cfdffe7b25125c070112ce0c2f1

commit 317cc829ee227cfdffe7b25125c070112ce0c2f1
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-04-05 16:26:09 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-04-05 16:26:09 +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
---
 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