diff mbox series

[3/4] lib: drop fwts_memcpy_unaligned

Message ID 20181115232517.4588-4-leif.lindholm@linaro.org
State Accepted
Headers show
Series various /dev/mem related cleanup | expand

Commit Message

Leif Lindholm Nov. 15, 2018, 11:25 p.m. UTC
fwts_memcpy_unaligned has no users left in the tree, so drop it.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 src/lib/include/fwts_stringextras.h |  1 -
 src/lib/src/fwts_stringextras.c     | 15 ---------------
 2 files changed, 16 deletions(-)

Comments

Alex Hung Nov. 16, 2018, 3:11 a.m. UTC | #1
On 2018-11-16 7:25 a.m., Leif Lindholm wrote:
> fwts_memcpy_unaligned has no users left in the tree, so drop it.
> 
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
>  src/lib/include/fwts_stringextras.h |  1 -
>  src/lib/src/fwts_stringextras.c     | 15 ---------------
>  2 files changed, 16 deletions(-)
> 
> diff --git a/src/lib/include/fwts_stringextras.h b/src/lib/include/fwts_stringextras.h
> index cd5fa822..7b605b4b 100644
> --- a/src/lib/include/fwts_stringextras.h
> +++ b/src/lib/include/fwts_stringextras.h
> @@ -25,6 +25,5 @@
>  void fwts_chop_newline(char *str);
>  char *fwts_realloc_strcat(char *orig, const char *newstr);
>  const char *fwts_string_endswith(const char *str, const char *postfix);
> -void fwts_memcpy_unaligned(void *dst, const void *src, size_t n);
>  
>  #endif
> diff --git a/src/lib/src/fwts_stringextras.c b/src/lib/src/fwts_stringextras.c
> index 1f22224d..b4053579 100644
> --- a/src/lib/src/fwts_stringextras.c
> +++ b/src/lib/src/fwts_stringextras.c
> @@ -98,18 +98,3 @@ const char *fwts_string_endswith(const char *str, const char *postfix)
>  
>  	return str + sl - pl;
>  }
> -
> -/*
> - * fwts_memcpy_unaligned()
> - *     perform byte copy of n bytes from src to dst.
> - */
> -void fwts_memcpy_unaligned(void *dst, const void *src, size_t n)
> -{
> -	size_t i = n;
> -
> -	if (dst == NULL || src == NULL || n == 0 )
> -		return;
> -
> -	while (i--)
> -		((uint8_t *)dst)[i] = ((const uint8_t *)src)[i];
> -}
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Colin Ian King Nov. 16, 2018, 9:04 a.m. UTC | #2
On 15/11/2018 23:25, Leif Lindholm wrote:
> fwts_memcpy_unaligned has no users left in the tree, so drop it.
> 
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
>  src/lib/include/fwts_stringextras.h |  1 -
>  src/lib/src/fwts_stringextras.c     | 15 ---------------
>  2 files changed, 16 deletions(-)
> 
> diff --git a/src/lib/include/fwts_stringextras.h b/src/lib/include/fwts_stringextras.h
> index cd5fa822..7b605b4b 100644
> --- a/src/lib/include/fwts_stringextras.h
> +++ b/src/lib/include/fwts_stringextras.h
> @@ -25,6 +25,5 @@
>  void fwts_chop_newline(char *str);
>  char *fwts_realloc_strcat(char *orig, const char *newstr);
>  const char *fwts_string_endswith(const char *str, const char *postfix);
> -void fwts_memcpy_unaligned(void *dst, const void *src, size_t n);
>  
>  #endif
> diff --git a/src/lib/src/fwts_stringextras.c b/src/lib/src/fwts_stringextras.c
> index 1f22224d..b4053579 100644
> --- a/src/lib/src/fwts_stringextras.c
> +++ b/src/lib/src/fwts_stringextras.c
> @@ -98,18 +98,3 @@ const char *fwts_string_endswith(const char *str, const char *postfix)
>  
>  	return str + sl - pl;
>  }
> -
> -/*
> - * fwts_memcpy_unaligned()
> - *     perform byte copy of n bytes from src to dst.
> - */
> -void fwts_memcpy_unaligned(void *dst, const void *src, size_t n)
> -{
> -	size_t i = n;
> -
> -	if (dst == NULL || src == NULL || n == 0 )
> -		return;
> -
> -	while (i--)
> -		((uint8_t *)dst)[i] = ((const uint8_t *)src)[i];
> -}
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox series

Patch

diff --git a/src/lib/include/fwts_stringextras.h b/src/lib/include/fwts_stringextras.h
index cd5fa822..7b605b4b 100644
--- a/src/lib/include/fwts_stringextras.h
+++ b/src/lib/include/fwts_stringextras.h
@@ -25,6 +25,5 @@ 
 void fwts_chop_newline(char *str);
 char *fwts_realloc_strcat(char *orig, const char *newstr);
 const char *fwts_string_endswith(const char *str, const char *postfix);
-void fwts_memcpy_unaligned(void *dst, const void *src, size_t n);
 
 #endif
diff --git a/src/lib/src/fwts_stringextras.c b/src/lib/src/fwts_stringextras.c
index 1f22224d..b4053579 100644
--- a/src/lib/src/fwts_stringextras.c
+++ b/src/lib/src/fwts_stringextras.c
@@ -98,18 +98,3 @@  const char *fwts_string_endswith(const char *str, const char *postfix)
 
 	return str + sl - pl;
 }
-
-/*
- * fwts_memcpy_unaligned()
- *     perform byte copy of n bytes from src to dst.
- */
-void fwts_memcpy_unaligned(void *dst, const void *src, size_t n)
-{
-	size_t i = n;
-
-	if (dst == NULL || src == NULL || n == 0 )
-		return;
-
-	while (i--)
-		((uint8_t *)dst)[i] = ((const uint8_t *)src)[i];
-}