xserver: Branch 'master' - 4 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 23:14:04 UTC 2025
hw/xfree86/common/xf86Helper.c | 1 +
hw/xfree86/common/xf86Init.c | 1 +
hw/xfree86/common/xf86Module.h | 6 ------
hw/xfree86/common/xf86Module_priv.h | 22 ++++++++++++++++++++++
hw/xfree86/common/xf86Xinput.c | 1 +
hw/xfree86/loader/loader.c | 30 ------------------------------
hw/xfree86/loader/loadmod.c | 9 +++------
7 files changed, 28 insertions(+), 42 deletions(-)
New commits:
commit 00f69564c5fa1bc9ead59a4412aa852f6f06c241
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 16 15:58:58 2024 +0200
xfree86: common: unexport UnloadModule() and UnloadSubModule()
Not used by any driver/module, so no need to keep it exported.
Also making them type-safe.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722>
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 09cbac6f1..9839622f0 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -61,6 +61,7 @@
#include "xf86InPriv.h"
#include "xf86Config.h"
#include "mivalidate.h"
+#include "xf86Module_priv.h"
/* For xf86GetClocks */
#if defined(CSRG_BASED) || defined(__GNU__)
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index bcfaf8d1d..a21afe04b 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -66,6 +66,7 @@
#include "systemd-logind.h"
#include "loaderProcs.h"
+#include "xf86Module_priv.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Config.h"
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 8db6ad6de..6c25c4bd1 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -151,8 +151,6 @@ typedef struct {
extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
const char **, void *,
const XF86ModReqInfo *, int *, int *);
-extern _X_EXPORT void UnloadSubModule(void *);
-extern _X_EXPORT void UnloadModule(void *);
extern _X_EXPORT void *LoaderSymbol(const char *);
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
diff --git a/hw/xfree86/common/xf86Module_priv.h b/hw/xfree86/common/xf86Module_priv.h
new file mode 100644
index 000000000..8a5995382
--- /dev/null
+++ b/hw/xfree86/common/xf86Module_priv.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XORG_XF86MODULE_PRIV_H
+#define _XORG_XF86MODULE_PRIV_H
+
+/*
+ * unload a previously loaded module
+ *
+ * @param mod the module to unload
+ */
+void UnloadModule(ModuleDescPtr mod);
+
+/*
+ * unload a previously loaded sun-module
+ *
+ * @param mod the sub-module to unload
+ */
+void UnloadSubModule(ModuleDescPtr mod);
+
+#endif /* _XORG_XF86MODULE_PRIV_H */
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 2d310cc58..d0f9db52e 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -76,6 +76,7 @@
#include "eventstr.h"
#include "inpututils.h"
#include "optionstr.h"
+#include "xf86Module_priv.h"
#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index cca11028c..39763453c 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -55,6 +55,7 @@
#include "loaderProcs.h"
#include "xf86Module.h"
#include "loader.h"
+#include "xf86Module_priv.h"
#include <sys/stat.h>
#include <sys/types.h>
@@ -840,10 +841,8 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
}
void
-UnloadModule(void *_mod)
+UnloadModule(ModuleDescPtr mod)
{
- ModuleDescPtr mod = _mod;
-
if (mod == (ModuleDescPtr) 1)
return;
@@ -873,10 +872,8 @@ UnloadModule(void *_mod)
}
void
-UnloadSubModule(void *_mod)
+UnloadSubModule(ModuleDescPtr mod)
{
- ModuleDescPtr mod = (ModuleDescPtr) _mod;
-
/* Some drivers are calling us on built-in submodules, ignore them */
if (mod == (ModuleDescPtr) 1)
return;
commit b0452ecff4f08372a20d606f65887bd55485498f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 16 16:36:02 2024 +0200
xfree86: drop obsolete macro INITARGS
This macro isn't used anymore for 12 years now, see commit:
5079db78aea8fa42e781dd876c1ee1c31571b3ae
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722>
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index f8eb2603f..8db6ad6de 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -147,8 +147,6 @@ typedef struct {
#define GET_MODULE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF)
#define GET_MODULE_PATCHLEVEL(vers) ((vers) & 0xFFFF)
-#define INITARGS void
-
/* Prototypes for Loader functions that are exported to modules */
extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
const char **, void *,
commit f3887956ecb33018c36fe9880e533045385570bd
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 16 13:50:58 2024 +0200
xfree86: loader: drop unused LoaderGetABIVersion()
This function isn't called anywhere, neither in xserver nor modules, thus no
need to keep it around.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722>
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index 8458adbdf..f8eb2603f 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -158,7 +158,6 @@ extern _X_EXPORT void UnloadModule(void *);
extern _X_EXPORT void *LoaderSymbol(const char *);
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
-extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
typedef void *(*ModuleSetupProc) (void *, void *, int *, int *);
typedef void (*ModuleTearDownProc) (void *);
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index afbb467a4..cd3493166 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -153,27 +153,3 @@ LoaderSetOptions(unsigned long opts)
{
LoaderOptions |= opts;
}
-
-int
-LoaderGetABIVersion(const char *abiclass)
-{
- struct {
- const char *name;
- int version;
- } classes[] = {
- {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion},
- {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion},
- {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion},
- {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion},
- {NULL, 0}
- };
- int i;
-
- for (i = 0; classes[i].name; i++) {
- if (!strcmp(classes[i].name, abiclass)) {
- return classes[i].version;
- }
- }
-
- return 0;
-}
commit d8c47a3db65e37f5afb1876a621b135c186cfd6f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Wed Oct 16 13:49:41 2024 +0200
xfree86: loader: drop unused LoaderShouldIgnoreABI()
This function isn't called anywhere, neither in xserver nor modules, thus no
need to keep it around.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1722>
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index fffeb82c9..8458adbdf 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -158,7 +158,6 @@ extern _X_EXPORT void UnloadModule(void *);
extern _X_EXPORT void *LoaderSymbol(const char *);
extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *);
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
-extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
typedef void *(*ModuleSetupProc) (void *, void *, int *, int *);
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 4696b639d..afbb467a4 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -154,12 +154,6 @@ LoaderSetOptions(unsigned long opts)
LoaderOptions |= opts;
}
-Bool
-LoaderShouldIgnoreABI(void)
-{
- return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0;
-}
-
int
LoaderGetABIVersion(const char *abiclass)
{
More information about the xorg-commit
mailing list