summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/acutils.h
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-07-01 09:45:11 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-07-02 00:17:55 +0300
commit4fa4616e279df89baeb36287bbee83ab272edaed (patch)
tree4e50fd71d00dbb6ed9583589a2f65b048bf3a195 /drivers/acpi/acpica/acutils.h
parent63c43812ee99efe7903955bae8cd928e9582477a (diff)
downloadlinux-4fa4616e279df89baeb36287bbee83ab272edaed.tar.xz
ACPICA: De-macroize calls to standard C library functions
ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4 ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69 Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the standard names such as strlen. The original purpose for these macros is long since obsolete. Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng. Link: https://github.com/acpica/acpica/commit/3b1026e0 Link: https://github.com/acpica/acpica/commit/00f0dc83 Link: https://github.com/acpica/acpica/commit/47d22a73 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/acutils.h')
-rw-r--r--drivers/acpi/acpica/acutils.h46
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 6391c9706e84..ef1e51d0f038 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -210,37 +210,35 @@ void acpi_ut_subsystem_shutdown(void);
*/
#ifndef ACPI_USE_SYSTEM_CLIBRARY
-acpi_size acpi_ut_strlen(const char *string);
+acpi_size strlen(const char *string);
-char *acpi_ut_strchr(const char *string, int ch);
+char *strchr(const char *string, int ch);
-char *acpi_ut_strcpy(char *dst_string, const char *src_string);
+char *strcpy(char *dst_string, const char *src_string);
-char *acpi_ut_strncpy(char *dst_string,
- const char *src_string, acpi_size count);
+char *strncpy(char *dst_string, const char *src_string, acpi_size count);
-int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count);
+int strncmp(const char *string1, const char *string2, acpi_size count);
-int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count);
+int strcmp(const char *string1, const char *string2);
-int acpi_ut_strcmp(const char *string1, const char *string2);
+char *strcat(char *dst_string, const char *src_string);
-char *acpi_ut_strcat(char *dst_string, const char *src_string);
+char *strncat(char *dst_string, const char *src_string, acpi_size count);
-char *acpi_ut_strncat(char *dst_string,
- const char *src_string, acpi_size count);
+u32 strtoul(const char *string, char **terminator, u32 base);
-u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base);
+char *strstr(char *string1, char *string2);
-char *acpi_ut_strstr(char *string1, char *string2);
+int memcmp(void *buffer1, void *buffer2, acpi_size count);
-void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count);
+void *memcpy(void *dest, const void *src, acpi_size count);
-void *acpi_ut_memset(void *dest, u8 value, acpi_size count);
+void *memset(void *dest, int value, acpi_size count);
-int acpi_ut_to_upper(int c);
+int toupper(int c);
-int acpi_ut_to_lower(int c);
+int tolower(int c);
extern const u8 _acpi_ctype[];
@@ -255,13 +253,13 @@ extern const u8 _acpi_ctype[];
#define _ACPI_UP 0x01 /* 'A'-'Z' */
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
-#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
-#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
-#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
-#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
-#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
-#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
-#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
+#define isdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
+#define isspace(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
+#define isxdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
+#define isupper(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
+#define islower(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
+#define isprint(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
+#define isalpha(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
#endif /* !ACPI_USE_SYSTEM_CLIBRARY */