summaryrefslogtreecommitdiffstats
path: root/fs/smb/server/unicode.h
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <linux@treblig.org>2023-08-17 02:22:29 +0200
committerSteve French <stfrench@microsoft.com>2023-08-30 15:55:51 +0200
commit9e74938954749ecc3e0da63d0e211238ad4b2425 (patch)
tree8a926be3ea23d731065be99425d09d2b2dfece35 /fs/smb/server/unicode.h
parentSMB3: rename macro CIFS_SERVER_IS_CHAN to avoid confusion (diff)
downloadlinux-9e74938954749ecc3e0da63d0e211238ad4b2425.tar.xz
linux-9e74938954749ecc3e0da63d0e211238ad4b2425.zip
fs/smb: Remove unicode 'lower' tables
The unicode glue in smb/*/..uniupr.h has a section guarded by 'ifndef UNIUPR_NOLOWER' - but that's always defined in smb/*/..unicode.h. Nuke those tables. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/smb/server/unicode.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/fs/smb/server/unicode.h b/fs/smb/server/unicode.h
index 076f6034a789..b48c7b11b9c7 100644
--- a/fs/smb/server/unicode.h
+++ b/fs/smb/server/unicode.h
@@ -26,8 +26,6 @@
#include <linux/nls.h>
#include <linux/unicode.h>
-#define UNIUPR_NOLOWER /* Example to not expand lower case tables */
-
/*
* Windows maps these to the user defined 16 bit Unicode range since they are
* reserved symbols (along with \ and /), otherwise illegal to store
@@ -57,11 +55,6 @@ extern signed char SmbUniUpperTable[512];
extern const struct UniCaseRange SmbUniUpperRange[];
#endif /* UNIUPR_NOUPPER */
-#ifndef UNIUPR_NOLOWER
-extern signed char CifsUniLowerTable[512];
-extern const struct UniCaseRange CifsUniLowerRange[];
-#endif /* UNIUPR_NOLOWER */
-
#ifdef __KERNEL__
int smb_strtoUTF16(__le16 *to, const char *from, int len,
const struct nls_table *codepage);
@@ -314,45 +307,4 @@ static inline __le16 *UniStrupr(register __le16 *upin)
}
#endif /* UNIUPR_NOUPPER */
-#ifndef UNIUPR_NOLOWER
-/*
- * UniTolower: Convert a unicode character to lower case
- */
-static inline wchar_t UniTolower(register wchar_t uc)
-{
- register const struct UniCaseRange *rp;
-
- if (uc < sizeof(CifsUniLowerTable)) {
- /* Latin characters */
- return uc + CifsUniLowerTable[uc]; /* Use base tables */
- }
-
- rp = CifsUniLowerRange; /* Use range tables */
- while (rp->start) {
- if (uc < rp->start) /* Before start of range */
- return uc; /* Uppercase = input */
- if (uc <= rp->end) /* In range */
- return uc + rp->table[uc - rp->start];
- rp++; /* Try next range */
- }
- return uc; /* Past last range */
-}
-
-/*
- * UniStrlwr: Lower case a unicode string
- */
-static inline wchar_t *UniStrlwr(register wchar_t *upin)
-{
- register wchar_t *up;
-
- up = upin;
- while (*up) { /* For all characters */
- *up = UniTolower(*up);
- up++;
- }
- return upin; /* Return input pointer */
-}
-
-#endif
-
#endif /* _CIFS_UNICODE_H */