Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2024 16:26:53 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 317cc829ee22 - main - LinuxKPI: Remove the temporary variable fileid from the macro request_module
Message-ID:  <202404051626.435GQrgS097143@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404051626.435GQrgS097143>