From 08f87f769b595151be1afeff53e144f543faa614 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 06 Dec 2023 09:51:13 +0000
Subject: [PATCH] add dts config

---
 kernel/drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/kernel/drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c b/kernel/drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c
index 201ff51..9317023 100644
--- a/kernel/drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c
+++ b/kernel/drivers/gpu/arm/bifrost/mali_kbase_mem_profile_debugfs.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
 /*
  *
- * (C) COPYRIGHT 2012-2017, 2019-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2012-2017, 2019-2022 ARM Limited. All rights reserved.
  *
  * This program is free software and is provided to you under the terms of the
  * GNU General Public License version 2 as published by the Free Software
@@ -24,13 +24,13 @@
 #if IS_ENABLED(CONFIG_DEBUG_FS)
 
 /**
- * Show callback for the @c mem_profile debugfs file.
- *
- * This function is called to get the contents of the @c mem_profile debugfs
- * file. This is a report of current memory usage and distribution in userspace.
+ * kbasep_mem_profile_seq_show - Show callback for the @c mem_profile debugfs file.
  *
  * @sfile: The debugfs entry
  * @data:  Data associated with the entry
+ *
+ * This function is called to get the contents of the @c mem_profile debugfs
+ * file. This is a report of current memory usage and distribution in userspace.
  *
  * Return: 0 if it successfully prints data in debugfs entry file, non-zero
  * otherwise
@@ -69,11 +69,7 @@
 int kbasep_mem_profile_debugfs_insert(struct kbase_context *kctx, char *data,
 					size_t size)
 {
-#if (KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE)
 	const mode_t mode = 0444;
-#else
-	const mode_t mode = 0400;
-#endif
 	int err = 0;
 
 	mutex_lock(&kctx->mem_profile_lock);
@@ -84,9 +80,9 @@
 	if (!kbase_ctx_flag(kctx, KCTX_MEM_PROFILE_INITIALIZED)) {
 		if (IS_ERR_OR_NULL(kctx->kctx_dentry)) {
 			err  = -ENOMEM;
-		} else if (!debugfs_create_file("mem_profile", mode,
-					kctx->kctx_dentry, kctx,
-					&kbasep_mem_profile_debugfs_fops)) {
+		} else if (IS_ERR_OR_NULL(debugfs_create_file("mem_profile",
+					mode, kctx->kctx_dentry, kctx,
+					&kbasep_mem_profile_debugfs_fops))) {
 			err = -EAGAIN;
 		} else {
 			kbase_ctx_flag_set(kctx,

--
Gitblit v1.6.2