From a31d9375dfbd7f0f4030c0b81f2030ff554529be Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 8 Jul 2026 22:37:05 +0200 Subject: string: remove unused strswab() function The last use of this function with rather peculiar semantics[*] vanished in 2021 with 0a527fda782 ("Fix IDE commands issued, fix endian issues, fix non MMIO"). It has no tests, and should a need for something similar ever appear, it is better done with some proper utf16le/utf16be/utf16 abstractions rather than cluttering code with '#ifdef __LITTLE_ENDIAN'. [*] The byte-swapping itself is weird enough. But why is an input string of odd length ok, while the empty string is not allowed? Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- include/linux/string.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/string.h b/include/linux/string.h index 488a459ed99..5bcbf72a89b 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -107,10 +107,6 @@ extern char * strndup(const char *, size_t); extern const char *strdup_const(const char *s); extern void kfree_const(const void *x); -#ifndef __HAVE_ARCH_STRSWAB -extern char * strswab(const char *); -#endif - #ifndef __HAVE_ARCH_MEMSET extern void * memset(void *,int,__kernel_size_t); #endif -- cgit v1.3.1