diff mbox series

[5/6] drm: Add __init annotations

Message ID 8f5fe817-dfcf-4cda-9ca2-99648a48534e@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm: Series with core improvements/refactorings | expand

Commit Message

Heiner Kallweit Sept. 8, 2024, 12:12 p.m. UTC
Annotate few more functions being called from drm_core_init() only
as __init.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/gpu/drm/drm_cache.c     | 2 +-
 drivers/gpu/drm/drm_connector.c | 2 +-
 drivers/gpu/drm/drm_sysfs.c     | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Dmitry Baryshkov Sept. 22, 2024, 3:12 p.m. UTC | #1
On Sun, Sep 08, 2024 at 02:12:32PM GMT, Heiner Kallweit wrote:
> Annotate few more functions being called from drm_core_init() only
> as __init.

Why? Please describe the reason for the changes, not the changes
themselves.

> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/gpu/drm/drm_cache.c     | 2 +-
>  drivers/gpu/drm/drm_connector.c | 2 +-
>  drivers/gpu/drm/drm_sysfs.c     | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 7051c9c90..dac790108 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -329,7 +329,7 @@  EXPORT_SYMBOL(drm_memcpy_from_wc);
 /*
  * drm_memcpy_init_early - One time initialization of the WC memcpy code
  */
-void drm_memcpy_init_early(void)
+void __init drm_memcpy_init_early(void)
 {
 	/*
 	 * Some hypervisors (e.g. KVM) don't support VEX-prefix instructions
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index fc35f47e2..96b234af7 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -112,7 +112,7 @@  static struct drm_conn_prop_enum_list drm_connector_enum_list[] = {
 	{ DRM_MODE_CONNECTOR_USB, "USB" },
 };
 
-void drm_connector_ida_init(void)
+void __init drm_connector_ida_init(void)
 {
 	int i;
 
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index f443f9a76..b73c589c5 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -87,7 +87,7 @@  static struct acpi_bus_type drm_connector_acpi_bus = {
 	.find_companion = drm_connector_acpi_find_companion,
 };
 
-static void drm_sysfs_acpi_register(void)
+static void __init drm_sysfs_acpi_register(void)
 {
 	register_acpi_bus_type(&drm_connector_acpi_bus);
 }
@@ -139,7 +139,7 @@  static const struct component_ops typec_connector_ops = {
  *
  * Return: 0 on success, negative error code on failure.
  */
-int drm_sysfs_init(void)
+int __init drm_sysfs_init(void)
 {
 	int ret = class_register(&drm_class);