From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 31 Jan 2024 03:29:01 +0000
Subject: [PATCH] add lvds1024*800

---
 kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tl_serialize.h |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tl_serialize.h b/kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tl_serialize.h
index 30d120d..b6aaade 100644
--- a/kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tl_serialize.h
+++ b/kernel/drivers/gpu/arm/bifrost/tl/mali_kbase_tl_serialize.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /*
  *
- * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 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
@@ -32,12 +32,12 @@
 /**
  * kbasep_serialize_bytes - serialize bytes to the message buffer
  *
- * Serialize bytes as is using memcpy()
- *
  * @buffer:    Message buffer
  * @pos:       Message buffer offset
  * @bytes:     Bytes to serialize
  * @len:       Length of bytes array
+ *
+ * Serialize bytes as if using memcpy().
  *
  * Return: updated position in the buffer
  */
@@ -58,13 +58,13 @@
 /**
  * kbasep_serialize_string - serialize string to the message buffer
  *
- * String is serialized as 4 bytes for string size,
- * then string content and then null terminator.
- *
  * @buffer:         Message buffer
  * @pos:            Message buffer offset
  * @string:         String to serialize
  * @max_write_size: Number of bytes that can be stored in buffer
+ *
+ * String is serialized as 4 bytes for string size,
+ * then string content and then null terminator.
  *
  * Return: updated position in the buffer
  */
@@ -84,7 +84,7 @@
 	KBASE_DEBUG_ASSERT(max_write_size >= sizeof(string_len) + sizeof(char));
 	max_write_size -= sizeof(string_len);
 
-	string_len = strlcpy(
+	string_len = strscpy(
 			&buffer[pos + sizeof(string_len)],
 			string,
 			max_write_size);
@@ -102,11 +102,11 @@
 /**
  * kbasep_serialize_timestamp - serialize timestamp to the message buffer
  *
- * Get current timestamp using kbasep_get_timestamp()
- * and serialize it as 64 bit unsigned integer.
- *
  * @buffer: Message buffer
  * @pos:    Message buffer offset
+ *
+ * Get current timestamp using kbasep_get_timestamp()
+ * and serialize it as 64 bit unsigned integer.
  *
  * Return: updated position in the buffer
  */
@@ -121,4 +121,3 @@
 			&timestamp, sizeof(timestamp));
 }
 #endif /* _KBASE_TL_SERIALIZE_H */
-

--
Gitblit v1.6.2