aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 14:23:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 14:23:42 -0700
commitb6e6e3a8408cdd3e9264df98c51953fa36968bee (patch)
treec85ede0f7b10c6ec11cb88e25b79cef4b156fae5 /drivers/staging
parentstaging: csr: remove CsrMemMove() (diff)
downloadlinux-dev-b6e6e3a8408cdd3e9264df98c51953fa36968bee.tar.xz
linux-dev-b6e6e3a8408cdd3e9264df98c51953fa36968bee.zip
staging: csr: remove CsrStrCpy
It was really just strcpy() so use that instead. Also remove CsrUtf8StrCpy() as no one was calling that function. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/csr/csr_serialize_primitive_types.c2
-rw-r--r--drivers/staging/csr/csr_unicode.h24
-rw-r--r--drivers/staging/csr/csr_utf16.c5
-rw-r--r--drivers/staging/csr/csr_util.c5
-rw-r--r--drivers/staging/csr/csr_util.h2
5 files changed, 1 insertions, 37 deletions
diff --git a/drivers/staging/csr/csr_serialize_primitive_types.c b/drivers/staging/csr/csr_serialize_primitive_types.c
index 5fb026c2710b..2e4a8e909318 100644
--- a/drivers/staging/csr/csr_serialize_primitive_types.c
+++ b/drivers/staging/csr/csr_serialize_primitive_types.c
@@ -123,7 +123,7 @@ void CsrCharStringSer(u8 *buffer, size_t *offset, const char *value)
{
if (value)
{
- CsrStrCpy(((char *) &buffer[*offset]), value);
+ strcpy(((char *) &buffer[*offset]), value);
*offset += CsrStrLen(value) + 1;
}
else
diff --git a/drivers/staging/csr/csr_unicode.h b/drivers/staging/csr/csr_unicode.h
index 44d7fd95a6b5..b54a9ce94482 100644
--- a/drivers/staging/csr/csr_unicode.h
+++ b/drivers/staging/csr/csr_unicode.h
@@ -69,30 +69,6 @@ u8 *CsrUtf8StrTruncate(u8 *target, size_t count);
/*******************************************************************************
NAME
- CsrUtf8StrCpy
-
- DESCRIPTION
- Copies the null terminated UTF-8 string pointed at by source into the
- memory pointed at by target, including the terminating null character.
-
- To avoid overflows, the size of the memory pointed at by target shall be
- long enough to contain the same UTF-8 string as source (including the
- terminating null character), and should not overlap in memory with
- source.
-
- PARAMETERS
- target - Pointer to the target memory where the content is to be copied.
- source - UTF-8 string to be copied.
-
- RETURNS
- Returns target
-
-*******************************************************************************/
-u8 *CsrUtf8StrCpy(u8 *target, const u8 *source);
-
-/*******************************************************************************
-
- NAME
CsrUtf8StrNCpy
DESCRIPTION
diff --git a/drivers/staging/csr/csr_utf16.c b/drivers/staging/csr/csr_utf16.c
index 46bd130a248a..db91a73a1d30 100644
--- a/drivers/staging/csr/csr_utf16.c
+++ b/drivers/staging/csr/csr_utf16.c
@@ -1035,11 +1035,6 @@ u32 CsrUtf8StringLengthInBytes(const u8 *string)
return (u32) length;
}
-u8 *CsrUtf8StrCpy(u8 *target, const u8 *source)
-{
- return (u8 *) CsrStrCpy((char *) target, (const char *) source);
-}
-
u8 *CsrUtf8StrTruncate(u8 *target, size_t count)
{
size_t lastByte = count - 1;
diff --git a/drivers/staging/csr/csr_util.c b/drivers/staging/csr/csr_util.c
index 20dbe3e040e1..e1e9467cc9ee 100644
--- a/drivers/staging/csr/csr_util.c
+++ b/drivers/staging/csr/csr_util.c
@@ -45,11 +45,6 @@ EXPORT_SYMBOL_GPL(CsrMemCpy);
#endif
#ifndef CSR_USE_STDC_LIB
-char *CsrStrCpy(char *dest, const char *src)
-{
- return strcpy(dest, src);
-}
-
char *CsrStrNCpy(char *dest, const char *src, size_t count)
{
return strncpy(dest, src, count);
diff --git a/drivers/staging/csr/csr_util.h b/drivers/staging/csr/csr_util.h
index e4987b14216d..c7aa3a6ecee4 100644
--- a/drivers/staging/csr/csr_util.h
+++ b/drivers/staging/csr/csr_util.h
@@ -28,7 +28,6 @@ void CsrUInt16ToHex(u16 number, char *str);
/*------------------------------------------------------------------*/
#ifdef CSR_USE_STDC_LIB
#define CsrMemCpy memcpy
-#define CsrStrCpy strcpy
#define CsrStrNCpy strncpy
#define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2)))
#define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n)))
@@ -36,7 +35,6 @@ void CsrUInt16ToHex(u16 number, char *str);
#define CsrStrLen strlen
#else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, size_t count);
-char *CsrStrCpy(char *dest, const char *src);
char *CsrStrNCpy(char *dest, const char *src, size_t count);
s32 CsrStrCmp(const char *string1, const char *string2);
s32 CsrStrNCmp(const char *string1, const char *string2, size_t count);