diff --git a/drivers/mxc/amd-gpu/common/gsl_memmgr.c b/drivers/mxc/amd-gpu/common/gsl_memmgr.c index 65d9b868bb8..3c9a3df27ff 100644 --- a/drivers/mxc/amd-gpu/common/gsl_memmgr.c +++ b/drivers/mxc/amd-gpu/common/gsl_memmgr.c @@ -297,9 +297,9 @@ kgsl_memarena_create(int aperture_id, int mmu_virtualized, unsigned int hostbase // define unique mutex for each memory arena instance id_str[0] = (char) (count + '0'); id_str[1] = '\0'; - kos_strcpy(name, "GSL_memory_arena_"); - len = kos_strlen(name); - kos_strcpy(&name[len], id_str); + strcpy(name, "GSL_memory_arena_"); + len = strlen(name); + strcpy(&name[len], id_str); memarena->mutex = kos_mutex_create(name); diff --git a/drivers/mxc/amd-gpu/os/kernel/include/kos_libapi.h b/drivers/mxc/amd-gpu/os/kernel/include/kos_libapi.h index c85362eb321..e9b238ea363 100644 --- a/drivers/mxc/amd-gpu/os/kernel/include/kos_libapi.h +++ b/drivers/mxc/amd-gpu/os/kernel/include/kos_libapi.h @@ -161,79 +161,7 @@ KOS_API void kos_enable_memoryleakcheck(void); KOS_API void kos_memoryfence(void); -////////////////////////////////////////////////////////////////////////////// -// string API -////////////////////////////////////////////////////////////////////////////// -/*-------------------------------------------------------------------*//*! - * \external - * \brief Perform a string copy. - * - * - * \param void* strdestination Pointer to destination memory. - * \param void* strsource Pointer to the source string. - * \return Zero if ok, othervise an error code. - *//*-------------------------------------------------------------------*/ -KOS_API char* kos_strcpy(char* strdestination, const char* strsource); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Perform a string copy with given length. - * - * - * \param void* destination Pointer to destination memory. - * \param void* source Pointer to the source string. - * \param int length Amount of bytes to copy. - * \return Returns the destination pointer. - *//*-------------------------------------------------------------------*/ -KOS_API char* kos_strncpy(char* destination, const char* source, int length); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Append source string to destination string. - * - * - * \param void* strdestination Pointer to destination string. - * \param void* strsource Pointer to the source string. - * \return Returns the destination pointer. - *//*-------------------------------------------------------------------*/ -KOS_API char* kos_strcat(char* strdestination, const char* strsource); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Compare two strings. - * - * - * \param void* string1 Pointer to first string. - * \param void* string2 Pointer to second string. - * \param void* length Number of bytes to compare. - * \return Zero if identical, >0 if first string is lexically greater <0 if not. - *//*-------------------------------------------------------------------*/ -KOS_API int kos_strcmp(const char* string1, const char* string2); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Compares two strings of given length. - * - * - * \param void* string1 Pointer to first string. - * \param void* string2 Pointer to second string. - * \param void* length Number of bytes to compare. - * \return Zero if identical, >0 if first string is lexically greater <0 if not. - *//*-------------------------------------------------------------------*/ -KOS_API int kos_strncmp(const char* string1, const char* string2, int length); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Calculates the length of a string.. - * - * - * \param void* string Pointer to the string. - * \return Lenght of the string in bytes. - *//*-------------------------------------------------------------------*/ -KOS_API int kos_strlen(const char* string); -/*-------------------------------------------------------------------*//*! - * \external - * \brief Convert an numeric ascii string to integer value. - * - * - * \param void* string Pointer to the string. - * \return Integer value extracted from the string. - *//*-------------------------------------------------------------------*/ + KOS_API int kos_atoi(const char* string); /*-------------------------------------------------------------------*//*! * \external diff --git a/drivers/mxc/amd-gpu/os/kernel/src/linux/kos_lib.c b/drivers/mxc/amd-gpu/os/kernel/src/linux/kos_lib.c index 1ef0037eebd..324649be7b4 100644 --- a/drivers/mxc/amd-gpu/os/kernel/src/linux/kos_lib.c +++ b/drivers/mxc/amd-gpu/os/kernel/src/linux/kos_lib.c @@ -146,67 +146,6 @@ kos_enable_memoryleakcheck(void) KOS_DBGFLAGS_SET(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); } -////////////////////////////////////////////////////////////////////////////// -// string API -////////////////////////////////////////////////////////////////////////////// - -KOS_API char* -kos_strcpy(char* strdestination, const char* strsource) -{ - KOS_ASSERT(strdestination); - KOS_ASSERT(strsource); - return strcpy(strdestination, strsource); -} - -//---------------------------------------------------------------------------- - -KOS_API char* -kos_strncpy(char* destination, const char* source, int length) -{ - KOS_ASSERT(destination); - KOS_ASSERT(source); - return strncpy(destination, source, length); -} - -//---------------------------------------------------------------------------- - -KOS_API char* -kos_strcat(char* strdestination, const char* strsource) -{ - KOS_ASSERT(strdestination); - KOS_ASSERT(strsource); - return strcat(strdestination, strsource); -} - -//---------------------------------------------------------------------------- - -KOS_API int -kos_strcmp(const char* string1, const char* string2) -{ - KOS_ASSERT(string1); - KOS_ASSERT(string2); - return strcmp(string1, string2); -} - -//---------------------------------------------------------------------------- - -KOS_API int -kos_strncmp(const char* string1, const char* string2, int length) -{ - KOS_ASSERT(string1); - KOS_ASSERT(string2); - return strncmp(string1, string2, length); -} - -//---------------------------------------------------------------------------- - -KOS_API int -kos_strlen(const char* string) -{ - KOS_ASSERT(string); - return strlen(string); -} - ////////////////////////////////////////////////////////////////////////////// // sync API //////////////////////////////////////////////////////////////////////////////