From d3eea38dbbf32ad912f8afe04b8728b1c1307ac3 Mon Sep 17 00:00:00 2001 From: Zhen Chen Date: Thu, 9 Mar 2023 16:33:13 +0800 Subject: [PATCH] Mali: bifrost: make some functions not depend on CONFIG_DEBUG_FS Including: kbase_device_kinstr_prfcnt_init(), kbase_device_kinstr_prfcnt_term(), kbase_device_io_history_init(), kbase_device_io_history_term. To resolve compilation errors when CONFIG_DEBUG_FS is not enabled. Change-Id: Ibeaf97bd9fdbbb45308160e11c4dbb386a0dea71 Signed-off-by: Zhen Chen --- drivers/gpu/arm/bifrost/device/mali_kbase_device.c | 2 -- .../arm/bifrost/device/mali_kbase_device_internal.h | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/drivers/gpu/arm/bifrost/device/mali_kbase_device.c b/drivers/gpu/arm/bifrost/device/mali_kbase_device.c index fb3e4176395e..80ee62f64fd2 100644 --- a/drivers/gpu/arm/bifrost/device/mali_kbase_device.c +++ b/drivers/gpu/arm/bifrost/device/mali_kbase_device.c @@ -460,7 +460,6 @@ void kbase_device_kinstr_prfcnt_term(struct kbase_device *kbdev) kbase_kinstr_prfcnt_term(kbdev->kinstr_prfcnt_ctx); } -#if defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI) int kbase_device_io_history_init(struct kbase_device *kbdev) { return kbase_io_history_init(&kbdev->io_history, @@ -471,7 +470,6 @@ void kbase_device_io_history_term(struct kbase_device *kbdev) { kbase_io_history_term(&kbdev->io_history); } -#endif int kbase_device_misc_register(struct kbase_device *kbdev) { diff --git a/drivers/gpu/arm/bifrost/device/mali_kbase_device_internal.h b/drivers/gpu/arm/bifrost/device/mali_kbase_device_internal.h index 2c1c6ecec15f..6f77592dfff2 100644 --- a/drivers/gpu/arm/bifrost/device/mali_kbase_device_internal.h +++ b/drivers/gpu/arm/bifrost/device/mali_kbase_device_internal.h @@ -54,18 +54,8 @@ void kbase_device_hwcnt_virtualizer_term(struct kbase_device *kbdev); int kbase_device_list_init(struct kbase_device *kbdev); void kbase_device_list_term(struct kbase_device *kbdev); -#if defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI) int kbase_device_io_history_init(struct kbase_device *kbdev); void kbase_device_io_history_term(struct kbase_device *kbdev); -#else -static inline int kbase_device_io_history_init(struct kbase_device *kbdev) -{ - return 0; -} -static inline void kbase_device_io_history_term(struct kbase_device *kbdev) -{ -} -#endif int kbase_device_misc_register(struct kbase_device *kbdev); void kbase_device_misc_deregister(struct kbase_device *kbdev);