aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpica/acutils.h46
-rw-r--r--drivers/acpi/acpica/dsfield.c2
-rw-r--r--drivers/acpi/acpica/dsinit.c2
-rw-r--r--drivers/acpi/acpica/dsobject.c7
-rw-r--r--drivers/acpi/acpica/dsutils.c4
-rw-r--r--drivers/acpi/acpica/evgpeinit.c2
-rw-r--r--drivers/acpi/acpica/exconfig.c2
-rw-r--r--drivers/acpi/acpica/exconvrt.c9
-rw-r--r--drivers/acpi/acpica/exfield.c2
-rw-r--r--drivers/acpi/acpica/exfldio.c52
-rw-r--r--drivers/acpi/acpica/exmisc.c36
-rw-r--r--drivers/acpi/acpica/exnames.c2
-rw-r--r--drivers/acpi/acpica/exoparg2.c4
-rw-r--r--drivers/acpi/acpica/exoparg3.c4
-rw-r--r--drivers/acpi/acpica/exregion.c9
-rw-r--r--drivers/acpi/acpica/exstorob.c18
-rw-r--r--drivers/acpi/acpica/nsaccess.c6
-rw-r--r--drivers/acpi/acpica/nsconvert.c10
-rw-r--r--drivers/acpi/acpica/nsdump.c2
-rw-r--r--drivers/acpi/acpica/nseval.c2
-rw-r--r--drivers/acpi/acpica/nsinit.c4
-rw-r--r--drivers/acpi/acpica/nsrepair2.c2
-rw-r--r--drivers/acpi/acpica/nsutils.c3
-rw-r--r--drivers/acpi/acpica/nsxfeval.c5
-rw-r--r--drivers/acpi/acpica/nsxfname.c6
-rw-r--r--drivers/acpi/acpica/psutils.c7
-rw-r--r--drivers/acpi/acpica/rscreate.c6
-rw-r--r--drivers/acpi/acpica/rsmisc.c8
-rw-r--r--drivers/acpi/acpica/rsutils.c11
-rw-r--r--drivers/acpi/acpica/rsxface.c8
-rw-r--r--drivers/acpi/acpica/tbdata.c8
-rw-r--r--drivers/acpi/acpica/tbfadt.c6
-rw-r--r--drivers/acpi/acpica/tbfind.c21
-rw-r--r--drivers/acpi/acpica/tbinstal.c7
-rw-r--r--drivers/acpi/acpica/tbprint.c10
-rw-r--r--drivers/acpi/acpica/tbutils.c2
-rw-r--r--drivers/acpi/acpica/tbxface.c16
-rw-r--r--drivers/acpi/acpica/tbxfload.c4
-rw-r--r--drivers/acpi/acpica/utalloc.c6
-rw-r--r--drivers/acpi/acpica/utbuffer.c4
-rw-r--r--drivers/acpi/acpica/utcache.c6
-rw-r--r--drivers/acpi/acpica/utcopy.c42
-rw-r--r--drivers/acpi/acpica/utids.c9
-rw-r--r--drivers/acpi/acpica/utmisc.c6
-rw-r--r--drivers/acpi/acpica/utosi.c9
-rw-r--r--drivers/acpi/acpica/utpredef.c4
-rw-r--r--drivers/acpi/acpica/utprint.c6
-rw-r--r--drivers/acpi/acpica/utstring.c33
-rw-r--r--drivers/acpi/acpica/uttrack.c8
-rw-r--r--drivers/acpi/acpica/utxface.c8
50 files changed, 241 insertions, 255 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);
210 */ 210 */
211#ifndef ACPI_USE_SYSTEM_CLIBRARY 211#ifndef ACPI_USE_SYSTEM_CLIBRARY
212 212
213acpi_size acpi_ut_strlen(const char *string); 213acpi_size strlen(const char *string);
214 214
215char *acpi_ut_strchr(const char *string, int ch); 215char *strchr(const char *string, int ch);
216 216
217char *acpi_ut_strcpy(char *dst_string, const char *src_string); 217char *strcpy(char *dst_string, const char *src_string);
218 218
219char *acpi_ut_strncpy(char *dst_string, 219char *strncpy(char *dst_string, const char *src_string, acpi_size count);
220 const char *src_string, acpi_size count);
221 220
222int acpi_ut_memcmp(const char *buffer1, const char *buffer2, acpi_size count); 221int strncmp(const char *string1, const char *string2, acpi_size count);
223 222
224int acpi_ut_strncmp(const char *string1, const char *string2, acpi_size count); 223int strcmp(const char *string1, const char *string2);
225 224
226int acpi_ut_strcmp(const char *string1, const char *string2); 225char *strcat(char *dst_string, const char *src_string);
227 226
228char *acpi_ut_strcat(char *dst_string, const char *src_string); 227char *strncat(char *dst_string, const char *src_string, acpi_size count);
229 228
230char *acpi_ut_strncat(char *dst_string, 229u32 strtoul(const char *string, char **terminator, u32 base);
231 const char *src_string, acpi_size count);
232 230
233u32 acpi_ut_strtoul(const char *string, char **terminator, u32 base); 231char *strstr(char *string1, char *string2);
234 232
235char *acpi_ut_strstr(char *string1, char *string2); 233int memcmp(void *buffer1, void *buffer2, acpi_size count);
236 234
237void *acpi_ut_memcpy(void *dest, const void *src, acpi_size count); 235void *memcpy(void *dest, const void *src, acpi_size count);
238 236
239void *acpi_ut_memset(void *dest, u8 value, acpi_size count); 237void *memset(void *dest, int value, acpi_size count);
240 238
241int acpi_ut_to_upper(int c); 239int toupper(int c);
242 240
243int acpi_ut_to_lower(int c); 241int tolower(int c);
244 242
245extern const u8 _acpi_ctype[]; 243extern const u8 _acpi_ctype[];
246 244
@@ -255,13 +253,13 @@ extern const u8 _acpi_ctype[];
255#define _ACPI_UP 0x01 /* 'A'-'Z' */ 253#define _ACPI_UP 0x01 /* 'A'-'Z' */
256#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 254#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
257 255
258#define ACPI_IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI)) 256#define isdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
259#define ACPI_IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP)) 257#define isspace(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
260#define ACPI_IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD)) 258#define isxdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
261#define ACPI_IS_UPPER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP)) 259#define isupper(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
262#define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) 260#define islower(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
263#define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU)) 261#define isprint(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
264#define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) 262#define isalpha(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
265 263
266#endif /* !ACPI_USE_SYSTEM_CLIBRARY */ 264#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
267 265
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 43b40de90484..20de148594fd 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -502,7 +502,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
502 } 502 }
503 } 503 }
504 504
505 ACPI_MEMSET(&info, 0, sizeof(struct acpi_create_field_info)); 505 memset(&info, 0, sizeof(struct acpi_create_field_info));
506 506
507 /* Second arg is the field flags */ 507 /* Second arg is the field flags */
508 508
diff --git a/drivers/acpi/acpica/dsinit.c b/drivers/acpi/acpica/dsinit.c
index bbe74bcebbae..95779e8ec3bb 100644
--- a/drivers/acpi/acpica/dsinit.c
+++ b/drivers/acpi/acpica/dsinit.c
@@ -207,7 +207,7 @@ acpi_ds_initialize_objects(u32 table_index,
207 207
208 /* Set all init info to zero */ 208 /* Set all init info to zero */
209 209
210 ACPI_MEMSET(&info, 0, sizeof(struct acpi_init_walk_info)); 210 memset(&info, 0, sizeof(struct acpi_init_walk_info));
211 211
212 info.owner_id = owner_id; 212 info.owner_id = owner_id;
213 info.table_index = table_index; 213 info.table_index = table_index;
diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c
index 4a4b2f343713..2beb7fd674ae 100644
--- a/drivers/acpi/acpica/dsobject.c
+++ b/drivers/acpi/acpica/dsobject.c
@@ -339,8 +339,8 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
339 /* Initialize buffer from the byte_list (if present) */ 339 /* Initialize buffer from the byte_list (if present) */
340 340
341 if (byte_list) { 341 if (byte_list) {
342 ACPI_MEMCPY(obj_desc->buffer.pointer, 342 memcpy(obj_desc->buffer.pointer, byte_list->named.data,
343 byte_list->named.data, byte_list_length); 343 byte_list_length);
344 } 344 }
345 } 345 }
346 346
@@ -750,8 +750,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
750 case ACPI_TYPE_STRING: 750 case ACPI_TYPE_STRING:
751 751
752 obj_desc->string.pointer = op->common.value.string; 752 obj_desc->string.pointer = op->common.value.string;
753 obj_desc->string.length = 753 obj_desc->string.length = (u32)strlen(op->common.value.string);
754 (u32)ACPI_STRLEN(op->common.value.string);
755 754
756 /* 755 /*
757 * The string is contained in the ACPI table, don't ever try 756 * The string is contained in the ACPI table, don't ever try
diff --git a/drivers/acpi/acpica/dsutils.c b/drivers/acpi/acpica/dsutils.c
index deeddd6d2f05..ebc577baeaf9 100644
--- a/drivers/acpi/acpica/dsutils.c
+++ b/drivers/acpi/acpica/dsutils.c
@@ -572,8 +572,8 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
572 obj_desc = 572 obj_desc =
573 acpi_ut_create_string_object((acpi_size) name_length); 573 acpi_ut_create_string_object((acpi_size) name_length);
574 574
575 ACPI_STRNCPY(obj_desc->string.pointer, 575 strncpy(obj_desc->string.pointer,
576 name_string, name_length); 576 name_string, name_length);
577 status = AE_OK; 577 status = AE_OK;
578 } else { 578 } else {
579 /* 579 /*
diff --git a/drivers/acpi/acpica/evgpeinit.c b/drivers/acpi/acpica/evgpeinit.c
index 8840296d5b20..ea4c0d3fca2d 100644
--- a/drivers/acpi/acpica/evgpeinit.c
+++ b/drivers/acpi/acpica/evgpeinit.c
@@ -377,7 +377,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
377 377
378 /* 4) The last two characters of the name are the hex GPE Number */ 378 /* 4) The last two characters of the name are the hex GPE Number */
379 379
380 gpe_number = ACPI_STRTOUL(&name[2], NULL, 16); 380 gpe_number = strtoul(&name[2], NULL, 16);
381 if (gpe_number == ACPI_UINT32_MAX) { 381 if (gpe_number == ACPI_UINT32_MAX) {
382 382
383 /* Conversion failed; invalid method, just ignore it */ 383 /* Conversion failed; invalid method, just ignore it */
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 6e0df2b9d5a4..24a4c5c2b124 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -470,7 +470,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
470 return_ACPI_STATUS(AE_NO_MEMORY); 470 return_ACPI_STATUS(AE_NO_MEMORY);
471 } 471 }
472 472
473 ACPI_MEMCPY(table, table_header, length); 473 memcpy(table, table_header, length);
474 break; 474 break;
475 475
476 default: 476 default:
diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index 89a976b4ccf2..075d654c837f 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -227,9 +227,8 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
227 /* Copy the integer to the buffer, LSB first */ 227 /* Copy the integer to the buffer, LSB first */
228 228
229 new_buf = return_desc->buffer.pointer; 229 new_buf = return_desc->buffer.pointer;
230 ACPI_MEMCPY(new_buf, 230 memcpy(new_buf,
231 &obj_desc->integer.value, 231 &obj_desc->integer.value, acpi_gbl_integer_byte_width);
232 acpi_gbl_integer_byte_width);
233 break; 232 break;
234 233
235 case ACPI_TYPE_STRING: 234 case ACPI_TYPE_STRING:
@@ -252,8 +251,8 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
252 /* Copy the string to the buffer */ 251 /* Copy the string to the buffer */
253 252
254 new_buf = return_desc->buffer.pointer; 253 new_buf = return_desc->buffer.pointer;
255 ACPI_STRNCPY((char *)new_buf, (char *)obj_desc->string.pointer, 254 strncpy((char *)new_buf, (char *)obj_desc->string.pointer,
256 obj_desc->string.length); 255 obj_desc->string.length);
257 break; 256 break;
258 257
259 default: 258 default:
diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index c161dd974f74..61fd9c7b88bc 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -428,7 +428,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
428 } 428 }
429 429
430 buffer = buffer_desc->buffer.pointer; 430 buffer = buffer_desc->buffer.pointer;
431 ACPI_MEMCPY(buffer, source_desc->buffer.pointer, length); 431 memcpy(buffer, source_desc->buffer.pointer, length);
432 432
433 /* Lock entire transaction if requested */ 433 /* Lock entire transaction if requested */
434 434
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 725a3746a2df..70b7bbbb860b 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -416,22 +416,22 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
416 * Copy the data from the source buffer. 416 * Copy the data from the source buffer.
417 * Length is the field width in bytes. 417 * Length is the field width in bytes.
418 */ 418 */
419 ACPI_MEMCPY(value, 419 memcpy(value,
420 (obj_desc->buffer_field.buffer_obj)->buffer. 420 (obj_desc->buffer_field.buffer_obj)->buffer.
421 pointer + 421 pointer +
422 obj_desc->buffer_field.base_byte_offset + 422 obj_desc->buffer_field.base_byte_offset +
423 field_datum_byte_offset, 423 field_datum_byte_offset,
424 obj_desc->common_field.access_byte_width); 424 obj_desc->common_field.access_byte_width);
425 } else { 425 } else {
426 /* 426 /*
427 * Copy the data to the target buffer. 427 * Copy the data to the target buffer.
428 * Length is the field width in bytes. 428 * Length is the field width in bytes.
429 */ 429 */
430 ACPI_MEMCPY((obj_desc->buffer_field.buffer_obj)->buffer. 430 memcpy((obj_desc->buffer_field.buffer_obj)->buffer.
431 pointer + 431 pointer +
432 obj_desc->buffer_field.base_byte_offset + 432 obj_desc->buffer_field.base_byte_offset +
433 field_datum_byte_offset, value, 433 field_datum_byte_offset, value,
434 obj_desc->common_field.access_byte_width); 434 obj_desc->common_field.access_byte_width);
435 } 435 }
436 436
437 status = AE_OK; 437 status = AE_OK;
@@ -703,7 +703,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
703 return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 703 return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
704 } 704 }
705 705
706 ACPI_MEMSET(buffer, 0, buffer_length); 706 memset(buffer, 0, buffer_length);
707 access_bit_width = ACPI_MUL_8(obj_desc->common_field.access_byte_width); 707 access_bit_width = ACPI_MUL_8(obj_desc->common_field.access_byte_width);
708 708
709 /* Handle the simple case here */ 709 /* Handle the simple case here */
@@ -720,7 +720,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
720 status = 720 status =
721 acpi_ex_field_datum_io(obj_desc, 0, &raw_datum, 721 acpi_ex_field_datum_io(obj_desc, 0, &raw_datum,
722 ACPI_READ); 722 ACPI_READ);
723 ACPI_MEMCPY(buffer, &raw_datum, buffer_length); 723 memcpy(buffer, &raw_datum, buffer_length);
724 } 724 }
725 725
726 return_ACPI_STATUS(status); 726 return_ACPI_STATUS(status);
@@ -793,9 +793,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
793 793
794 /* Write merged datum to target buffer */ 794 /* Write merged datum to target buffer */
795 795
796 ACPI_MEMCPY(((char *)buffer) + buffer_offset, &merged_datum, 796 memcpy(((char *)buffer) + buffer_offset, &merged_datum,
797 ACPI_MIN(obj_desc->common_field.access_byte_width, 797 ACPI_MIN(obj_desc->common_field.access_byte_width,
798 buffer_length - buffer_offset)); 798 buffer_length - buffer_offset));
799 799
800 buffer_offset += obj_desc->common_field.access_byte_width; 800 buffer_offset += obj_desc->common_field.access_byte_width;
801 merged_datum = 801 merged_datum =
@@ -811,9 +811,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
811 811
812 /* Write the last datum to the buffer */ 812 /* Write the last datum to the buffer */
813 813
814 ACPI_MEMCPY(((char *)buffer) + buffer_offset, &merged_datum, 814 memcpy(((char *)buffer) + buffer_offset, &merged_datum,
815 ACPI_MIN(obj_desc->common_field.access_byte_width, 815 ACPI_MIN(obj_desc->common_field.access_byte_width,
816 buffer_length - buffer_offset)); 816 buffer_length - buffer_offset));
817 817
818 return_ACPI_STATUS(AE_OK); 818 return_ACPI_STATUS(AE_OK);
819} 819}
@@ -878,7 +878,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
878 * at Byte zero. All unused (upper) bytes of the 878 * at Byte zero. All unused (upper) bytes of the
879 * buffer will be 0. 879 * buffer will be 0.
880 */ 880 */
881 ACPI_MEMCPY((char *)new_buffer, (char *)buffer, buffer_length); 881 memcpy((char *)new_buffer, (char *)buffer, buffer_length);
882 buffer = new_buffer; 882 buffer = new_buffer;
883 buffer_length = required_length; 883 buffer_length = required_length;
884 } 884 }
@@ -918,9 +918,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
918 918
919 /* Get initial Datum from the input buffer */ 919 /* Get initial Datum from the input buffer */
920 920
921 ACPI_MEMCPY(&raw_datum, buffer, 921 memcpy(&raw_datum, buffer,
922 ACPI_MIN(obj_desc->common_field.access_byte_width, 922 ACPI_MIN(obj_desc->common_field.access_byte_width,
923 buffer_length - buffer_offset)); 923 buffer_length - buffer_offset));
924 924
925 merged_datum = 925 merged_datum =
926 raw_datum << obj_desc->common_field.start_field_bit_offset; 926 raw_datum << obj_desc->common_field.start_field_bit_offset;
@@ -970,9 +970,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
970 /* Get the next input datum from the buffer */ 970 /* Get the next input datum from the buffer */
971 971
972 buffer_offset += obj_desc->common_field.access_byte_width; 972 buffer_offset += obj_desc->common_field.access_byte_width;
973 ACPI_MEMCPY(&raw_datum, ((char *)buffer) + buffer_offset, 973 memcpy(&raw_datum, ((char *)buffer) + buffer_offset,
974 ACPI_MIN(obj_desc->common_field.access_byte_width, 974 ACPI_MIN(obj_desc->common_field.access_byte_width,
975 buffer_length - buffer_offset)); 975 buffer_length - buffer_offset));
976 976
977 merged_datum |= 977 merged_datum |=
978 raw_datum << obj_desc->common_field.start_field_bit_offset; 978 raw_datum << obj_desc->common_field.start_field_bit_offset;
diff --git a/drivers/acpi/acpica/exmisc.c b/drivers/acpi/acpica/exmisc.c
index b56fc9d6f48e..d02afece0f10 100644
--- a/drivers/acpi/acpica/exmisc.c
+++ b/drivers/acpi/acpica/exmisc.c
@@ -209,8 +209,8 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
209 * end_tag descriptor is copied from Operand1. 209 * end_tag descriptor is copied from Operand1.
210 */ 210 */
211 new_buf = return_desc->buffer.pointer; 211 new_buf = return_desc->buffer.pointer;
212 ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); 212 memcpy(new_buf, operand0->buffer.pointer, length0);
213 ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); 213 memcpy(new_buf + length0, operand1->buffer.pointer, length1);
214 214
215 /* Insert end_tag and set the checksum to zero, means "ignore checksum" */ 215 /* Insert end_tag and set the checksum to zero, means "ignore checksum" */
216 216
@@ -318,14 +318,14 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
318 318
319 /* Copy the first integer, LSB first */ 319 /* Copy the first integer, LSB first */
320 320
321 ACPI_MEMCPY(new_buf, &operand0->integer.value, 321 memcpy(new_buf, &operand0->integer.value,
322 acpi_gbl_integer_byte_width); 322 acpi_gbl_integer_byte_width);
323 323
324 /* Copy the second integer (LSB first) after the first */ 324 /* Copy the second integer (LSB first) after the first */
325 325
326 ACPI_MEMCPY(new_buf + acpi_gbl_integer_byte_width, 326 memcpy(new_buf + acpi_gbl_integer_byte_width,
327 &local_operand1->integer.value, 327 &local_operand1->integer.value,
328 acpi_gbl_integer_byte_width); 328 acpi_gbl_integer_byte_width);
329 break; 329 break;
330 330
331 case ACPI_TYPE_STRING: 331 case ACPI_TYPE_STRING:
@@ -346,9 +346,9 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
346 346
347 /* Concatenate the strings */ 347 /* Concatenate the strings */
348 348
349 ACPI_STRCPY(new_buf, operand0->string.pointer); 349 strcpy(new_buf, operand0->string.pointer);
350 ACPI_STRCPY(new_buf + operand0->string.length, 350 strcpy(new_buf + operand0->string.length,
351 local_operand1->string.pointer); 351 local_operand1->string.pointer);
352 break; 352 break;
353 353
354 case ACPI_TYPE_BUFFER: 354 case ACPI_TYPE_BUFFER:
@@ -369,11 +369,11 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
369 369
370 /* Concatenate the buffers */ 370 /* Concatenate the buffers */
371 371
372 ACPI_MEMCPY(new_buf, operand0->buffer.pointer, 372 memcpy(new_buf, operand0->buffer.pointer,
373 operand0->buffer.length); 373 operand0->buffer.length);
374 ACPI_MEMCPY(new_buf + operand0->buffer.length, 374 memcpy(new_buf + operand0->buffer.length,
375 local_operand1->buffer.pointer, 375 local_operand1->buffer.pointer,
376 local_operand1->buffer.length); 376 local_operand1->buffer.length);
377 break; 377 break;
378 378
379 default: 379 default:
@@ -660,9 +660,9 @@ acpi_ex_do_logical_op(u16 opcode,
660 660
661 /* Lexicographic compare: compare the data bytes */ 661 /* Lexicographic compare: compare the data bytes */
662 662
663 compare = ACPI_MEMCMP(operand0->buffer.pointer, 663 compare = memcmp(operand0->buffer.pointer,
664 local_operand1->buffer.pointer, 664 local_operand1->buffer.pointer,
665 (length0 > length1) ? length1 : length0); 665 (length0 > length1) ? length1 : length0);
666 666
667 switch (opcode) { 667 switch (opcode) {
668 case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */ 668 case AML_LEQUAL_OP: /* LEqual (Operand0, Operand1) */
diff --git a/drivers/acpi/acpica/exnames.c b/drivers/acpi/acpica/exnames.c
index 453b00c30177..20e87813c7d7 100644
--- a/drivers/acpi/acpica/exnames.c
+++ b/drivers/acpi/acpica/exnames.c
@@ -192,7 +192,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
192 char_buf[4] = '\0'; 192 char_buf[4] = '\0';
193 193
194 if (name_string) { 194 if (name_string) {
195 ACPI_STRCAT(name_string, char_buf); 195 strcat(name_string, char_buf);
196 ACPI_DEBUG_PRINT((ACPI_DB_NAMES, 196 ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
197 "Appended to - %s\n", name_string)); 197 "Appended to - %s\n", name_string));
198 } else { 198 } else {
diff --git a/drivers/acpi/acpica/exoparg2.c b/drivers/acpi/acpica/exoparg2.c
index 6fac5e0a698a..b8944ebb1081 100644
--- a/drivers/acpi/acpica/exoparg2.c
+++ b/drivers/acpi/acpica/exoparg2.c
@@ -337,8 +337,8 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state)
337 * Copy the raw buffer data with no transform. 337 * Copy the raw buffer data with no transform.
338 * (NULL terminated already) 338 * (NULL terminated already)
339 */ 339 */
340 ACPI_MEMCPY(return_desc->string.pointer, 340 memcpy(return_desc->string.pointer,
341 operand[0]->buffer.pointer, length); 341 operand[0]->buffer.pointer, length);
342 break; 342 break;
343 343
344 case AML_CONCAT_RES_OP: 344 case AML_CONCAT_RES_OP:
diff --git a/drivers/acpi/acpica/exoparg3.c b/drivers/acpi/acpica/exoparg3.c
index 1c64a988cbee..fa100b3b92ee 100644
--- a/drivers/acpi/acpica/exoparg3.c
+++ b/drivers/acpi/acpica/exoparg3.c
@@ -237,8 +237,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
237 237
238 /* We have a buffer, copy the portion requested */ 238 /* We have a buffer, copy the portion requested */
239 239
240 ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, 240 memcpy(buffer, operand[0]->string.pointer + index,
241 length); 241 length);
242 } 242 }
243 243
244 /* Set the length of the new String/Buffer */ 244 /* Set the length of the new String/Buffer */
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index f6c2f5499935..b4a5e44c00dd 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -517,15 +517,14 @@ acpi_ex_data_table_space_handler(u32 function,
517 switch (function) { 517 switch (function) {
518 case ACPI_READ: 518 case ACPI_READ:
519 519
520 ACPI_MEMCPY(ACPI_CAST_PTR(char, value), 520 memcpy(ACPI_CAST_PTR(char, value),
521 ACPI_PHYSADDR_TO_PTR(address), 521 ACPI_PHYSADDR_TO_PTR(address), ACPI_DIV_8(bit_width));
522 ACPI_DIV_8(bit_width));
523 break; 522 break;
524 523
525 case ACPI_WRITE: 524 case ACPI_WRITE:
526 525
527 ACPI_MEMCPY(ACPI_PHYSADDR_TO_PTR(address), 526 memcpy(ACPI_PHYSADDR_TO_PTR(address),
528 ACPI_CAST_PTR(char, value), ACPI_DIV_8(bit_width)); 527 ACPI_CAST_PTR(char, value), ACPI_DIV_8(bit_width));
529 break; 528 break;
530 529
531 default: 530 default:
diff --git a/drivers/acpi/acpica/exstorob.c b/drivers/acpi/acpica/exstorob.c
index 6fa3c8d8fc5f..e1d4f4d51b97 100644
--- a/drivers/acpi/acpica/exstorob.c
+++ b/drivers/acpi/acpica/exstorob.c
@@ -100,9 +100,9 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
100 100
101 /* Clear existing buffer and copy in the new one */ 101 /* Clear existing buffer and copy in the new one */
102 102
103 ACPI_MEMSET(target_desc->buffer.pointer, 0, 103 memset(target_desc->buffer.pointer, 0,
104 target_desc->buffer.length); 104 target_desc->buffer.length);
105 ACPI_MEMCPY(target_desc->buffer.pointer, buffer, length); 105 memcpy(target_desc->buffer.pointer, buffer, length);
106 106
107#ifdef ACPI_OBSOLETE_BEHAVIOR 107#ifdef ACPI_OBSOLETE_BEHAVIOR
108 /* 108 /*
@@ -129,8 +129,8 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc,
129 } else { 129 } else {
130 /* Truncate the source, copy only what will fit */ 130 /* Truncate the source, copy only what will fit */
131 131
132 ACPI_MEMCPY(target_desc->buffer.pointer, buffer, 132 memcpy(target_desc->buffer.pointer, buffer,
133 target_desc->buffer.length); 133 target_desc->buffer.length);
134 134
135 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 135 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
136 "Truncating source buffer from %X to %X\n", 136 "Truncating source buffer from %X to %X\n",
@@ -187,9 +187,9 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
187 * String will fit in existing non-static buffer. 187 * String will fit in existing non-static buffer.
188 * Clear old string and copy in the new one 188 * Clear old string and copy in the new one
189 */ 189 */
190 ACPI_MEMSET(target_desc->string.pointer, 0, 190 memset(target_desc->string.pointer, 0,
191 (acpi_size) target_desc->string.length + 1); 191 (acpi_size) target_desc->string.length + 1);
192 ACPI_MEMCPY(target_desc->string.pointer, buffer, length); 192 memcpy(target_desc->string.pointer, buffer, length);
193 } else { 193 } else {
194 /* 194 /*
195 * Free the current buffer, then allocate a new buffer 195 * Free the current buffer, then allocate a new buffer
@@ -210,7 +210,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc,
210 } 210 }
211 211
212 target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER; 212 target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
213 ACPI_MEMCPY(target_desc->string.pointer, buffer, length); 213 memcpy(target_desc->string.pointer, buffer, length);
214 } 214 }
215 215
216 /* Set the new target length */ 216 /* Set the new target length */
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 19ad0b5993d5..c687b9979fb2 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -102,7 +102,7 @@ acpi_status acpi_ns_root_initialize(void)
102 102
103 /* _OSI is optional for now, will be permanent later */ 103 /* _OSI is optional for now, will be permanent later */
104 104
105 if (!ACPI_STRCMP(init_val->name, "_OSI") 105 if (!strcmp(init_val->name, "_OSI")
106 && !acpi_gbl_create_osi_method) { 106 && !acpi_gbl_create_osi_method) {
107 continue; 107 continue;
108 } 108 }
@@ -180,7 +180,7 @@ acpi_status acpi_ns_root_initialize(void)
180 180
181 /* Build an object around the static string */ 181 /* Build an object around the static string */
182 182
183 obj_desc->string.length = (u32)ACPI_STRLEN(val); 183 obj_desc->string.length = (u32)strlen(val);
184 obj_desc->string.pointer = val; 184 obj_desc->string.pointer = val;
185 obj_desc->common.flags |= AOPOBJ_STATIC_POINTER; 185 obj_desc->common.flags |= AOPOBJ_STATIC_POINTER;
186 break; 186 break;
@@ -203,7 +203,7 @@ acpi_status acpi_ns_root_initialize(void)
203 203
204 /* Special case for ACPI Global Lock */ 204 /* Special case for ACPI Global Lock */
205 205
206 if (ACPI_STRCMP(init_val->name, "_GL_") == 0) { 206 if (strcmp(init_val->name, "_GL_") == 0) {
207 acpi_gbl_global_lock_mutex = obj_desc; 207 acpi_gbl_global_lock_mutex = obj_desc;
208 208
209 /* Create additional counting semaphore for global lock */ 209 /* Create additional counting semaphore for global lock */
diff --git a/drivers/acpi/acpica/nsconvert.c b/drivers/acpi/acpica/nsconvert.c
index 1a8b39c8d969..da55a1c60da1 100644
--- a/drivers/acpi/acpica/nsconvert.c
+++ b/drivers/acpi/acpica/nsconvert.c
@@ -187,8 +187,8 @@ acpi_ns_convert_to_string(union acpi_operand_object *original_object,
187 * Copy the raw buffer data with no transform. String is already NULL 187 * Copy the raw buffer data with no transform. String is already NULL
188 * terminated at Length+1. 188 * terminated at Length+1.
189 */ 189 */
190 ACPI_MEMCPY(new_object->string.pointer, 190 memcpy(new_object->string.pointer,
191 original_object->buffer.pointer, length); 191 original_object->buffer.pointer, length);
192 break; 192 break;
193 193
194 default: 194 default:
@@ -251,9 +251,9 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
251 return (AE_NO_MEMORY); 251 return (AE_NO_MEMORY);
252 } 252 }
253 253
254 ACPI_MEMCPY(new_object->buffer.pointer, 254 memcpy(new_object->buffer.pointer,
255 original_object->string.pointer, 255 original_object->string.pointer,
256 original_object->string.length); 256 original_object->string.length);
257 break; 257 break;
258 258
259 case ACPI_TYPE_PACKAGE: 259 case ACPI_TYPE_PACKAGE:
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index d259393505fa..0f1daba640e7 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -101,7 +101,7 @@ void acpi_ns_print_pathname(u32 num_segments, char *pathname)
101 101
102 while (num_segments) { 102 while (num_segments) {
103 for (i = 0; i < 4; i++) { 103 for (i = 0; i < 4; i++) {
104 ACPI_IS_PRINT(pathname[i]) ? 104 isprint((int)pathname[i]) ?
105 acpi_os_printf("%c", pathname[i]) : 105 acpi_os_printf("%c", pathname[i]) :
106 acpi_os_printf("?"); 106 acpi_os_printf("?");
107 } 107 }
diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c
index 7bcc68f57afa..a725d88b036b 100644
--- a/drivers/acpi/acpica/nseval.c
+++ b/drivers/acpi/acpica/nseval.c
@@ -440,7 +440,7 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
440 440
441 /* Initialize the evaluation information block */ 441 /* Initialize the evaluation information block */
442 442
443 ACPI_MEMSET(info, 0, sizeof(struct acpi_evaluate_info)); 443 memset(info, 0, sizeof(struct acpi_evaluate_info));
444 info->prefix_node = parent_node; 444 info->prefix_node = parent_node;
445 445
446 /* 446 /*
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 4a85c4517988..b744a53618eb 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -90,7 +90,7 @@ acpi_status acpi_ns_initialize_objects(void)
90 90
91 /* Set all init info to zero */ 91 /* Set all init info to zero */
92 92
93 ACPI_MEMSET(&info, 0, sizeof(struct acpi_init_walk_info)); 93 memset(&info, 0, sizeof(struct acpi_init_walk_info));
94 94
95 /* Walk entire namespace from the supplied root */ 95 /* Walk entire namespace from the supplied root */
96 96
@@ -566,7 +566,7 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
566 ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname 566 ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname
567 (ACPI_TYPE_METHOD, device_node, METHOD_NAME__INI)); 567 (ACPI_TYPE_METHOD, device_node, METHOD_NAME__INI));
568 568
569 ACPI_MEMSET(info, 0, sizeof(struct acpi_evaluate_info)); 569 memset(info, 0, sizeof(struct acpi_evaluate_info));
570 info->prefix_node = device_node; 570 info->prefix_node = device_node;
571 info->relative_pathname = METHOD_NAME__INI; 571 info->relative_pathname = METHOD_NAME__INI;
572 info->parameters = NULL; 572 info->parameters = NULL;
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index c30672d23878..0515a70f42a4 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -580,7 +580,7 @@ acpi_ns_repair_HID(struct acpi_evaluate_info *info,
580 * # is a hex digit. 580 * # is a hex digit.
581 */ 581 */
582 for (dest = new_string->string.pointer; *source; dest++, source++) { 582 for (dest = new_string->string.pointer; *source; dest++, source++) {
583 *dest = (char)ACPI_TOUPPER(*source); 583 *dest = (char)toupper((int)*source);
584 } 584 }
585 585
586 acpi_ut_remove_reference(return_object); 586 acpi_ut_remove_reference(return_object);
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c
index 6ad02008c0c2..8d8104b8bd28 100644
--- a/drivers/acpi/acpica/nsutils.c
+++ b/drivers/acpi/acpica/nsutils.c
@@ -292,8 +292,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)
292 } else { 292 } else {
293 /* Convert the character to uppercase and save it */ 293 /* Convert the character to uppercase and save it */
294 294
295 result[i] = 295 result[i] = (char)toupper((int)*external_name);
296 (char)ACPI_TOUPPER((int)*external_name);
297 external_name++; 296 external_name++;
298 } 297 }
299 } 298 }
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index b6030a2deee1..6ee1e52b903d 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -696,7 +696,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
696 return (AE_CTRL_DEPTH); 696 return (AE_CTRL_DEPTH);
697 } 697 }
698 698
699 no_match = ACPI_STRCMP(hid->string, info->hid); 699 no_match = strcmp(hid->string, info->hid);
700 ACPI_FREE(hid); 700 ACPI_FREE(hid);
701 701
702 if (no_match) { 702 if (no_match) {
@@ -715,8 +715,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
715 715
716 found = FALSE; 716 found = FALSE;
717 for (i = 0; i < cid->count; i++) { 717 for (i = 0; i < cid->count; i++) {
718 if (ACPI_STRCMP(cid->ids[i].string, info->hid) 718 if (strcmp(cid->ids[i].string, info->hid) == 0) {
719 == 0) {
720 719
721 /* Found a matching CID */ 720 /* Found a matching CID */
722 721
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index dc0836a9cf17..9ff643b9553f 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -114,7 +114,7 @@ acpi_get_handle(acpi_handle parent,
114 114
115 /* Special case for root-only, since we can't search for it */ 115 /* Special case for root-only, since we can't search for it */
116 116
117 if (!ACPI_STRCMP(pathname, ACPI_NS_ROOT_PATH)) { 117 if (!strcmp(pathname, ACPI_NS_ROOT_PATH)) {
118 *ret_handle = 118 *ret_handle =
119 ACPI_CAST_PTR(acpi_handle, acpi_gbl_root_node); 119 ACPI_CAST_PTR(acpi_handle, acpi_gbl_root_node);
120 return (AE_OK); 120 return (AE_OK);
@@ -242,7 +242,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
242 242
243 /* Copy actual string and return a pointer to the next string area */ 243 /* Copy actual string and return a pointer to the next string area */
244 244
245 ACPI_MEMCPY(string_area, source->string, source->length); 245 memcpy(string_area, source->string, source->length);
246 return (string_area + source->length); 246 return (string_area + source->length);
247} 247}
248 248
@@ -637,7 +637,7 @@ acpi_status acpi_install_method(u8 *buffer)
637 637
638 /* Copy the method AML to the local buffer */ 638 /* Copy the method AML to the local buffer */
639 639
640 ACPI_MEMCPY(aml_buffer, aml_start, aml_length); 640 memcpy(aml_buffer, aml_start, aml_length);
641 641
642 /* Initialize the method object with the new method's information */ 642 /* Initialize the method object with the new method's information */
643 643
diff --git a/drivers/acpi/acpica/psutils.c b/drivers/acpi/acpica/psutils.c
index 960505ab409a..32440912023a 100644
--- a/drivers/acpi/acpica/psutils.c
+++ b/drivers/acpi/acpica/psutils.c
@@ -93,10 +93,9 @@ void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode)
93 op->common.descriptor_type = ACPI_DESC_TYPE_PARSER; 93 op->common.descriptor_type = ACPI_DESC_TYPE_PARSER;
94 op->common.aml_opcode = opcode; 94 op->common.aml_opcode = opcode;
95 95
96 ACPI_DISASM_ONLY_MEMBERS(ACPI_STRNCPY(op->common.aml_op_name, 96 ACPI_DISASM_ONLY_MEMBERS(strncpy(op->common.aml_op_name,
97 (acpi_ps_get_opcode_info 97 (acpi_ps_get_opcode_info(opcode))->
98 (opcode))->name, 98 name, sizeof(op->common.aml_op_name)));
99 sizeof(op->common.aml_op_name)));
100} 99}
101 100
102/******************************************************************************* 101/*******************************************************************************
diff --git a/drivers/acpi/acpica/rscreate.c b/drivers/acpi/acpica/rscreate.c
index f30f35e6ff2a..3fa829e96c2a 100644
--- a/drivers/acpi/acpica/rscreate.c
+++ b/drivers/acpi/acpica/rscreate.c
@@ -353,13 +353,13 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
353 /* +1 to include null terminator */ 353 /* +1 to include null terminator */
354 354
355 user_prt->length += 355 user_prt->length +=
356 (u32)ACPI_STRLEN(user_prt->source) + 1; 356 (u32)strlen(user_prt->source) + 1;
357 break; 357 break;
358 358
359 case ACPI_TYPE_STRING: 359 case ACPI_TYPE_STRING:
360 360
361 ACPI_STRCPY(user_prt->source, 361 strcpy(user_prt->source,
362 obj_desc->string.pointer); 362 obj_desc->string.pointer);
363 363
364 /* 364 /*
365 * Add to the Length field the length of the string 365 * Add to the Length field the length of the string
diff --git a/drivers/acpi/acpica/rsmisc.c b/drivers/acpi/acpica/rsmisc.c
index 1fe49d223663..ac37852e0821 100644
--- a/drivers/acpi/acpica/rsmisc.c
+++ b/drivers/acpi/acpica/rsmisc.c
@@ -119,7 +119,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
119 /* 119 /*
120 * Get the resource type and the initial (minimum) length 120 * Get the resource type and the initial (minimum) length
121 */ 121 */
122 ACPI_MEMSET(resource, 0, INIT_RESOURCE_LENGTH(info)); 122 memset(resource, 0, INIT_RESOURCE_LENGTH(info));
123 resource->type = INIT_RESOURCE_TYPE(info); 123 resource->type = INIT_RESOURCE_TYPE(info);
124 resource->length = INIT_RESOURCE_LENGTH(info); 124 resource->length = INIT_RESOURCE_LENGTH(info);
125 break; 125 break;
@@ -324,13 +324,13 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
324 324
325 case ACPI_RSC_SET8: 325 case ACPI_RSC_SET8:
326 326
327 ACPI_MEMSET(destination, info->aml_offset, info->value); 327 memset(destination, info->aml_offset, info->value);
328 break; 328 break;
329 329
330 case ACPI_RSC_DATA8: 330 case ACPI_RSC_DATA8:
331 331
332 target = ACPI_ADD_PTR(char, resource, info->value); 332 target = ACPI_ADD_PTR(char, resource, info->value);
333 ACPI_MEMCPY(destination, source, ACPI_GET16(target)); 333 memcpy(destination, source, ACPI_GET16(target));
334 break; 334 break;
335 335
336 case ACPI_RSC_ADDRESS: 336 case ACPI_RSC_ADDRESS:
@@ -502,7 +502,7 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource,
502 switch (info->opcode) { 502 switch (info->opcode) {
503 case ACPI_RSC_INITSET: 503 case ACPI_RSC_INITSET:
504 504
505 ACPI_MEMSET(aml, 0, INIT_RESOURCE_LENGTH(info)); 505 memset(aml, 0, INIT_RESOURCE_LENGTH(info));
506 aml_length = INIT_RESOURCE_LENGTH(info); 506 aml_length = INIT_RESOURCE_LENGTH(info);
507 acpi_rs_set_resource_header(INIT_RESOURCE_TYPE(info), 507 acpi_rs_set_resource_header(INIT_RESOURCE_TYPE(info),
508 aml_length, aml); 508 aml_length, aml);
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 90417de38dab..52b024df0052 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -148,7 +148,7 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
148 case ACPI_RSC_MOVE_SERIAL_VEN: 148 case ACPI_RSC_MOVE_SERIAL_VEN:
149 case ACPI_RSC_MOVE_SERIAL_RES: 149 case ACPI_RSC_MOVE_SERIAL_RES:
150 150
151 ACPI_MEMCPY(destination, source, item_count); 151 memcpy(destination, source, item_count);
152 return; 152 return;
153 153
154 /* 154 /*
@@ -364,12 +364,11 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
364 * Zero the entire area of the buffer. 364 * Zero the entire area of the buffer.
365 */ 365 */
366 total_length = 366 total_length =
367 (u32) 367 (u32)strlen(ACPI_CAST_PTR(char, &aml_resource_source[1])) +
368 ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) +
369 1; 368 1;
370 total_length = (u32)ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); 369 total_length = (u32)ACPI_ROUND_UP_TO_NATIVE_WORD(total_length);
371 370
372 ACPI_MEMSET(resource_source->string_ptr, 0, total_length); 371 memset(resource_source->string_ptr, 0, total_length);
373 372
374 /* Copy the resource_source string to the destination */ 373 /* Copy the resource_source string to the destination */
375 374
@@ -432,8 +431,8 @@ acpi_rs_set_resource_source(union aml_resource * aml,
432 431
433 /* Copy the resource_source string */ 432 /* Copy the resource_source string */
434 433
435 ACPI_STRCPY(ACPI_CAST_PTR(char, &aml_resource_source[1]), 434 strcpy(ACPI_CAST_PTR(char, &aml_resource_source[1]),
436 resource_source->string_ptr); 435 resource_source->string_ptr);
437 436
438 /* 437 /*
439 * Add the length of the string (+ 1 for null terminator) to the 438 * Add the length of the string (+ 1 for null terminator) to the
diff --git a/drivers/acpi/acpica/rsxface.c b/drivers/acpi/acpica/rsxface.c
index 8e6276df0226..de51f836ef68 100644
--- a/drivers/acpi/acpica/rsxface.c
+++ b/drivers/acpi/acpica/rsxface.c
@@ -398,8 +398,8 @@ acpi_resource_to_address64(struct acpi_resource *resource,
398 398
399 /* Simple copy for 64 bit source */ 399 /* Simple copy for 64 bit source */
400 400
401 ACPI_MEMCPY(out, &resource->data, 401 memcpy(out, &resource->data,
402 sizeof(struct acpi_resource_address64)); 402 sizeof(struct acpi_resource_address64));
403 break; 403 break;
404 404
405 default: 405 default:
@@ -499,7 +499,7 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
499 */ 499 */
500 if ((vendor->byte_length < (ACPI_UUID_LENGTH + 1)) || 500 if ((vendor->byte_length < (ACPI_UUID_LENGTH + 1)) ||
501 (vendor->uuid_subtype != info->uuid->subtype) || 501 (vendor->uuid_subtype != info->uuid->subtype) ||
502 (ACPI_MEMCMP(vendor->uuid, info->uuid->data, ACPI_UUID_LENGTH))) { 502 (memcmp(vendor->uuid, info->uuid->data, ACPI_UUID_LENGTH))) {
503 return (AE_OK); 503 return (AE_OK);
504 } 504 }
505 505
@@ -513,7 +513,7 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context)
513 513
514 /* Found the correct resource, copy and return it */ 514 /* Found the correct resource, copy and return it */
515 515
516 ACPI_MEMCPY(buffer->pointer, resource, resource->length); 516 memcpy(buffer->pointer, resource, resource->length);
517 buffer->length = resource->length; 517 buffer->length = resource->length;
518 518
519 /* Found the desired descriptor, terminate resource walk */ 519 /* Found the desired descriptor, terminate resource walk */
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index d7f8386455bd..5c9d5abf1588 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -73,7 +73,7 @@ acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
73 * Initialize the table descriptor. Set the pointer to NULL, since the 73 * Initialize the table descriptor. Set the pointer to NULL, since the
74 * table is not fully mapped at this time. 74 * table is not fully mapped at this time.
75 */ 75 */
76 ACPI_MEMSET(table_desc, 0, sizeof(struct acpi_table_desc)); 76 memset(table_desc, 0, sizeof(struct acpi_table_desc));
77 table_desc->address = address; 77 table_desc->address = address;
78 table_desc->length = table->length; 78 table_desc->length = table->length;
79 table_desc->flags = flags; 79 table_desc->flags = flags;
@@ -465,9 +465,9 @@ acpi_status acpi_tb_resize_root_table_list(void)
465 /* Copy and free the previous table array */ 465 /* Copy and free the previous table array */
466 466
467 if (acpi_gbl_root_table_list.tables) { 467 if (acpi_gbl_root_table_list.tables) {
468 ACPI_MEMCPY(tables, acpi_gbl_root_table_list.tables, 468 memcpy(tables, acpi_gbl_root_table_list.tables,
469 (acpi_size) table_count * 469 (acpi_size) table_count *
470 sizeof(struct acpi_table_desc)); 470 sizeof(struct acpi_table_desc));
471 471
472 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) { 472 if (acpi_gbl_root_table_list.flags & ACPI_ROOT_ORIGIN_ALLOCATED) {
473 ACPI_FREE(acpi_gbl_root_table_list.tables); 473 ACPI_FREE(acpi_gbl_root_table_list.tables);
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 05be59c772c7..6253001b6375 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -398,12 +398,12 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
398 398
399 /* Clear the entire local FADT */ 399 /* Clear the entire local FADT */
400 400
401 ACPI_MEMSET(&acpi_gbl_FADT, 0, sizeof(struct acpi_table_fadt)); 401 memset(&acpi_gbl_FADT, 0, sizeof(struct acpi_table_fadt));
402 402
403 /* Copy the original FADT, up to sizeof (struct acpi_table_fadt) */ 403 /* Copy the original FADT, up to sizeof (struct acpi_table_fadt) */
404 404
405 ACPI_MEMCPY(&acpi_gbl_FADT, table, 405 memcpy(&acpi_gbl_FADT, table,
406 ACPI_MIN(length, sizeof(struct acpi_table_fadt))); 406 ACPI_MIN(length, sizeof(struct acpi_table_fadt)));
407 407
408 /* Take a copy of the Hardware Reduced flag */ 408 /* Take a copy of the Hardware Reduced flag */
409 409
diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index 0b879fcfef67..119c84ad9833 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -76,16 +76,16 @@ acpi_tb_find_table(char *signature,
76 76
77 /* Normalize the input strings */ 77 /* Normalize the input strings */
78 78
79 ACPI_MEMSET(&header, 0, sizeof(struct acpi_table_header)); 79 memset(&header, 0, sizeof(struct acpi_table_header));
80 ACPI_MOVE_NAME(header.signature, signature); 80 ACPI_MOVE_NAME(header.signature, signature);
81 ACPI_STRNCPY(header.oem_id, oem_id, ACPI_OEM_ID_SIZE); 81 strncpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
82 ACPI_STRNCPY(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE); 82 strncpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
83 83
84 /* Search for the table */ 84 /* Search for the table */
85 85
86 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { 86 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
87 if (ACPI_MEMCMP(&(acpi_gbl_root_table_list.tables[i].signature), 87 if (memcmp(&(acpi_gbl_root_table_list.tables[i].signature),
88 header.signature, ACPI_NAME_SIZE)) { 88 header.signature, ACPI_NAME_SIZE)) {
89 89
90 /* Not the requested table */ 90 /* Not the requested table */
91 91
@@ -112,21 +112,20 @@ acpi_tb_find_table(char *signature,
112 112
113 /* Check for table match on all IDs */ 113 /* Check for table match on all IDs */
114 114
115 if (!ACPI_MEMCMP 115 if (!memcmp
116 (acpi_gbl_root_table_list.tables[i].pointer->signature, 116 (acpi_gbl_root_table_list.tables[i].pointer->signature,
117 header.signature, ACPI_NAME_SIZE) && (!oem_id[0] 117 header.signature, ACPI_NAME_SIZE) && (!oem_id[0]
118 || 118 ||
119 !ACPI_MEMCMP 119 !memcmp
120 (acpi_gbl_root_table_list. 120 (acpi_gbl_root_table_list.
121 tables[i].pointer-> 121 tables[i].pointer->
122 oem_id, 122 oem_id,
123 header.oem_id, 123 header.oem_id,
124 ACPI_OEM_ID_SIZE)) 124 ACPI_OEM_ID_SIZE))
125 && (!oem_table_id[0] 125 && (!oem_table_id[0]
126 || !ACPI_MEMCMP(acpi_gbl_root_table_list.tables[i]. 126 || !memcmp(acpi_gbl_root_table_list.tables[i].pointer->
127 pointer->oem_table_id, 127 oem_table_id, header.oem_table_id,
128 header.oem_table_id, 128 ACPI_OEM_TABLE_ID_SIZE))) {
129 ACPI_OEM_TABLE_ID_SIZE))) {
130 *table_index = i; 129 *table_index = i;
131 130
132 ACPI_DEBUG_PRINT((ACPI_DB_TABLES, 131 ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 008a251780f4..15ea98e0068d 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -87,8 +87,8 @@ acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index)
87 * not just the header. 87 * not just the header.
88 */ 88 */
89 is_identical = (u8)((table_desc->length != table_length || 89 is_identical = (u8)((table_desc->length != table_length ||
90 ACPI_MEMCMP(table_desc->pointer, table, 90 memcmp(table_desc->pointer, table, table_length)) ?
91 table_length)) ? FALSE : TRUE); 91 FALSE : TRUE);
92 92
93 /* Release the acquired table */ 93 /* Release the acquired table */
94 94
@@ -289,8 +289,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
289 if ((new_table_desc.signature.ascii[0] != 0x00) && 289 if ((new_table_desc.signature.ascii[0] != 0x00) &&
290 (!ACPI_COMPARE_NAME 290 (!ACPI_COMPARE_NAME
291 (&new_table_desc.signature, ACPI_SIG_SSDT)) 291 (&new_table_desc.signature, ACPI_SIG_SSDT))
292 && (ACPI_STRNCMP(new_table_desc.signature.ascii, "OEM", 3))) 292 && (strncmp(new_table_desc.signature.ascii, "OEM", 3))) {
293 {
294 ACPI_BIOS_ERROR((AE_INFO, 293 ACPI_BIOS_ERROR((AE_INFO,
295 "Table has invalid signature [%4.4s] (0x%8.8X), " 294 "Table has invalid signature [%4.4s] (0x%8.8X), "
296 "must be SSDT or OEMx", 295 "must be SSDT or OEMx",
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index 77ba5c71c6e7..709d5112fc16 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -73,7 +73,7 @@ static void acpi_tb_fix_string(char *string, acpi_size length)
73{ 73{
74 74
75 while (length && *string) { 75 while (length && *string) {
76 if (!ACPI_IS_PRINT(*string)) { 76 if (!isprint((int)*string)) {
77 *string = '?'; 77 *string = '?';
78 } 78 }
79 string++; 79 string++;
@@ -100,7 +100,7 @@ acpi_tb_cleanup_table_header(struct acpi_table_header *out_header,
100 struct acpi_table_header *header) 100 struct acpi_table_header *header)
101{ 101{
102 102
103 ACPI_MEMCPY(out_header, header, sizeof(struct acpi_table_header)); 103 memcpy(out_header, header, sizeof(struct acpi_table_header));
104 104
105 acpi_tb_fix_string(out_header->signature, ACPI_NAME_SIZE); 105 acpi_tb_fix_string(out_header->signature, ACPI_NAME_SIZE);
106 acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE); 106 acpi_tb_fix_string(out_header->oem_id, ACPI_OEM_ID_SIZE);
@@ -138,9 +138,9 @@ acpi_tb_print_table_header(acpi_physical_address address,
138 138
139 /* RSDP has no common fields */ 139 /* RSDP has no common fields */
140 140
141 ACPI_MEMCPY(local_header.oem_id, 141 memcpy(local_header.oem_id,
142 ACPI_CAST_PTR(struct acpi_table_rsdp, 142 ACPI_CAST_PTR(struct acpi_table_rsdp, header)->oem_id,
143 header)->oem_id, ACPI_OEM_ID_SIZE); 143 ACPI_OEM_ID_SIZE);
144 acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE); 144 acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
145 145
146 ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)", 146 ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 2bb6a117c840..568ac0e4a3c6 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -188,7 +188,7 @@ struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index)
188 return (NULL); 188 return (NULL);
189 } 189 }
190 190
191 ACPI_MEMCPY(new_table, table_desc->pointer, table_desc->length); 191 memcpy(new_table, table_desc->pointer, table_desc->length);
192 acpi_tb_uninstall_table(table_desc); 192 acpi_tb_uninstall_table(table_desc);
193 193
194 acpi_tb_init_table_descriptor(&acpi_gbl_root_table_list. 194 acpi_tb_init_table_descriptor(&acpi_gbl_root_table_list.
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 54b9f7957ff1..5559e2c70b15 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -119,9 +119,9 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,
119 } else { 119 } else {
120 /* Root Table Array has been statically allocated by the host */ 120 /* Root Table Array has been statically allocated by the host */
121 121
122 ACPI_MEMSET(initial_table_array, 0, 122 memset(initial_table_array, 0,
123 (acpi_size) initial_table_count * 123 (acpi_size) initial_table_count *
124 sizeof(struct acpi_table_desc)); 124 sizeof(struct acpi_table_desc));
125 125
126 acpi_gbl_root_table_list.tables = initial_table_array; 126 acpi_gbl_root_table_list.tables = initial_table_array;
127 acpi_gbl_root_table_list.max_table_count = initial_table_count; 127 acpi_gbl_root_table_list.max_table_count = initial_table_count;
@@ -243,8 +243,8 @@ acpi_get_table_header(char *signature,
243 return (AE_NO_MEMORY); 243 return (AE_NO_MEMORY);
244 } 244 }
245 245
246 ACPI_MEMCPY(out_table_header, header, 246 memcpy(out_table_header, header,
247 sizeof(struct acpi_table_header)); 247 sizeof(struct acpi_table_header));
248 acpi_os_unmap_memory(header, 248 acpi_os_unmap_memory(header,
249 sizeof(struct 249 sizeof(struct
250 acpi_table_header)); 250 acpi_table_header));
@@ -252,9 +252,9 @@ acpi_get_table_header(char *signature,
252 return (AE_NOT_FOUND); 252 return (AE_NOT_FOUND);
253 } 253 }
254 } else { 254 } else {
255 ACPI_MEMCPY(out_table_header, 255 memcpy(out_table_header,
256 acpi_gbl_root_table_list.tables[i].pointer, 256 acpi_gbl_root_table_list.tables[i].pointer,
257 sizeof(struct acpi_table_header)); 257 sizeof(struct acpi_table_header));
258 } 258 }
259 return (AE_OK); 259 return (AE_OK);
260 } 260 }
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index cf56e18cdc64..9682d40ca6ff 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -150,8 +150,8 @@ static acpi_status acpi_tb_load_namespace(void)
150 * Save the original DSDT header for detection of table corruption 150 * Save the original DSDT header for detection of table corruption
151 * and/or replacement of the DSDT from outside the OS. 151 * and/or replacement of the DSDT from outside the OS.
152 */ 152 */
153 ACPI_MEMCPY(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT, 153 memcpy(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT,
154 sizeof(struct acpi_table_header)); 154 sizeof(struct acpi_table_header));
155 155
156 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 156 (void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
157 157
diff --git a/drivers/acpi/acpica/utalloc.c b/drivers/acpi/acpica/utalloc.c
index 61d8f6d186d1..7a4101f0685e 100644
--- a/drivers/acpi/acpica/utalloc.c
+++ b/drivers/acpi/acpica/utalloc.c
@@ -73,7 +73,7 @@ void *acpi_os_allocate_zeroed(acpi_size size)
73 73
74 /* Clear the memory block */ 74 /* Clear the memory block */
75 75
76 ACPI_MEMSET(allocation, 0, size); 76 memset(allocation, 0, size);
77 } 77 }
78 78
79 return (allocation); 79 return (allocation);
@@ -181,7 +181,7 @@ acpi_status acpi_ut_delete_caches(void)
181 char buffer[7]; 181 char buffer[7];
182 182
183 if (acpi_gbl_display_final_mem_stats) { 183 if (acpi_gbl_display_final_mem_stats) {
184 ACPI_STRCPY(buffer, "MEMORY"); 184 strcpy(buffer, "MEMORY");
185 (void)acpi_db_display_statistics(buffer); 185 (void)acpi_db_display_statistics(buffer);
186 } 186 }
187#endif 187#endif
@@ -337,6 +337,6 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,
337 337
338 /* Have a valid buffer, clear it */ 338 /* Have a valid buffer, clear it */
339 339
340 ACPI_MEMSET(buffer->pointer, 0, required_length); 340 memset(buffer->pointer, 0, required_length);
341 return (AE_OK); 341 return (AE_OK);
342} 342}
diff --git a/drivers/acpi/acpica/utbuffer.c b/drivers/acpi/acpica/utbuffer.c
index a8c39643e618..01c8709ca586 100644
--- a/drivers/acpi/acpica/utbuffer.c
+++ b/drivers/acpi/acpica/utbuffer.c
@@ -159,7 +159,7 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
159 } 159 }
160 160
161 buf_char = buffer[(acpi_size) i + j]; 161 buf_char = buffer[(acpi_size) i + j];
162 if (ACPI_IS_PRINT(buf_char)) { 162 if (isprint(buf_char)) {
163 acpi_os_printf("%c", buf_char); 163 acpi_os_printf("%c", buf_char);
164 } else { 164 } else {
165 acpi_os_printf("."); 165 acpi_os_printf(".");
@@ -319,7 +319,7 @@ acpi_ut_dump_buffer_to_file(ACPI_FILE file,
319 } 319 }
320 320
321 buf_char = buffer[(acpi_size) i + j]; 321 buf_char = buffer[(acpi_size) i + j];
322 if (ACPI_IS_PRINT(buf_char)) { 322 if (isprint(buf_char)) {
323 acpi_ut_file_printf(file, "%c", buf_char); 323 acpi_ut_file_printf(file, "%c", buf_char);
324 } else { 324 } else {
325 acpi_ut_file_printf(file, "."); 325 acpi_ut_file_printf(file, ".");
diff --git a/drivers/acpi/acpica/utcache.c b/drivers/acpi/acpica/utcache.c
index eacc5eee362e..0d21fbd99363 100644
--- a/drivers/acpi/acpica/utcache.c
+++ b/drivers/acpi/acpica/utcache.c
@@ -84,7 +84,7 @@ acpi_os_create_cache(char *cache_name,
84 84
85 /* Populate the cache object and return it */ 85 /* Populate the cache object and return it */
86 86
87 ACPI_MEMSET(cache, 0, sizeof(struct acpi_memory_list)); 87 memset(cache, 0, sizeof(struct acpi_memory_list));
88 cache->list_name = cache_name; 88 cache->list_name = cache_name;
89 cache->object_size = object_size; 89 cache->object_size = object_size;
90 cache->max_depth = max_depth; 90 cache->max_depth = max_depth;
@@ -212,7 +212,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object)
212 212
213 /* Mark the object as cached */ 213 /* Mark the object as cached */
214 214
215 ACPI_MEMSET(object, 0xCA, cache->object_size); 215 memset(object, 0xCA, cache->object_size);
216 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_CACHED); 216 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_CACHED);
217 217
218 /* Put the object at the head of the cache list */ 218 /* Put the object at the head of the cache list */
@@ -281,7 +281,7 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
281 281
282 /* Clear (zero) the previously used Object */ 282 /* Clear (zero) the previously used Object */
283 283
284 ACPI_MEMSET(object, 0, cache->object_size); 284 memset(object, 0, cache->object_size);
285 } else { 285 } else {
286 /* The cache is empty, create a new object */ 286 /* The cache is empty, create a new object */
287 287
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index c37ec5035f4c..257221d452c8 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -129,7 +129,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
129 129
130 /* Always clear the external object */ 130 /* Always clear the external object */
131 131
132 ACPI_MEMSET(external_object, 0, sizeof(union acpi_object)); 132 memset(external_object, 0, sizeof(union acpi_object));
133 133
134 /* 134 /*
135 * In general, the external object will be the same type as 135 * In general, the external object will be the same type as
@@ -149,9 +149,9 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
149 string. 149 string.
150 length + 1); 150 length + 1);
151 151
152 ACPI_MEMCPY((void *)data_space, 152 memcpy((void *)data_space,
153 (void *)internal_object->string.pointer, 153 (void *)internal_object->string.pointer,
154 (acpi_size) internal_object->string.length + 1); 154 (acpi_size) internal_object->string.length + 1);
155 break; 155 break;
156 156
157 case ACPI_TYPE_BUFFER: 157 case ACPI_TYPE_BUFFER:
@@ -162,9 +162,9 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object,
162 ACPI_ROUND_UP_TO_NATIVE_WORD(internal_object->string. 162 ACPI_ROUND_UP_TO_NATIVE_WORD(internal_object->string.
163 length); 163 length);
164 164
165 ACPI_MEMCPY((void *)data_space, 165 memcpy((void *)data_space,
166 (void *)internal_object->buffer.pointer, 166 (void *)internal_object->buffer.pointer,
167 internal_object->buffer.length); 167 internal_object->buffer.length);
168 break; 168 break;
169 169
170 case ACPI_TYPE_INTEGER: 170 case ACPI_TYPE_INTEGER:
@@ -502,9 +502,9 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
502 goto error_exit; 502 goto error_exit;
503 } 503 }
504 504
505 ACPI_MEMCPY(internal_object->string.pointer, 505 memcpy(internal_object->string.pointer,
506 external_object->string.pointer, 506 external_object->string.pointer,
507 external_object->string.length); 507 external_object->string.length);
508 508
509 internal_object->string.length = external_object->string.length; 509 internal_object->string.length = external_object->string.length;
510 break; 510 break;
@@ -517,9 +517,9 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
517 goto error_exit; 517 goto error_exit;
518 } 518 }
519 519
520 ACPI_MEMCPY(internal_object->buffer.pointer, 520 memcpy(internal_object->buffer.pointer,
521 external_object->buffer.pointer, 521 external_object->buffer.pointer,
522 external_object->buffer.length); 522 external_object->buffer.length);
523 523
524 internal_object->buffer.length = external_object->buffer.length; 524 internal_object->buffer.length = external_object->buffer.length;
525 525
@@ -694,8 +694,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
694 copy_size = sizeof(struct acpi_namespace_node); 694 copy_size = sizeof(struct acpi_namespace_node);
695 } 695 }
696 696
697 ACPI_MEMCPY(ACPI_CAST_PTR(char, dest_desc), 697 memcpy(ACPI_CAST_PTR(char, dest_desc),
698 ACPI_CAST_PTR(char, source_desc), copy_size); 698 ACPI_CAST_PTR(char, source_desc), copy_size);
699 699
700 /* Restore the saved fields */ 700 /* Restore the saved fields */
701 701
@@ -725,9 +725,9 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
725 725
726 /* Copy the actual buffer data */ 726 /* Copy the actual buffer data */
727 727
728 ACPI_MEMCPY(dest_desc->buffer.pointer, 728 memcpy(dest_desc->buffer.pointer,
729 source_desc->buffer.pointer, 729 source_desc->buffer.pointer,
730 source_desc->buffer.length); 730 source_desc->buffer.length);
731 } 731 }
732 break; 732 break;
733 733
@@ -747,9 +747,9 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
747 747
748 /* Copy the actual string data */ 748 /* Copy the actual string data */
749 749
750 ACPI_MEMCPY(dest_desc->string.pointer, 750 memcpy(dest_desc->string.pointer,
751 source_desc->string.pointer, 751 source_desc->string.pointer,
752 (acpi_size) source_desc->string.length + 1); 752 (acpi_size) source_desc->string.length + 1);
753 } 753 }
754 break; 754 break;
755 755
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index 3afe07f19b9f..7956df1e263c 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -111,7 +111,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
111 if (obj_desc->common.type == ACPI_TYPE_INTEGER) { 111 if (obj_desc->common.type == ACPI_TYPE_INTEGER) {
112 acpi_ex_eisa_id_to_string(hid->string, obj_desc->integer.value); 112 acpi_ex_eisa_id_to_string(hid->string, obj_desc->integer.value);
113 } else { 113 } else {
114 ACPI_STRCPY(hid->string, obj_desc->string.pointer); 114 strcpy(hid->string, obj_desc->string.pointer);
115 } 115 }
116 116
117 hid->length = length; 117 hid->length = length;
@@ -180,7 +180,7 @@ acpi_ut_execute_SUB(struct acpi_namespace_node *device_node,
180 180
181 /* Simply copy existing string */ 181 /* Simply copy existing string */
182 182
183 ACPI_STRCPY(sub->string, obj_desc->string.pointer); 183 strcpy(sub->string, obj_desc->string.pointer);
184 sub->length = length; 184 sub->length = length;
185 *return_id = sub; 185 *return_id = sub;
186 186
@@ -256,7 +256,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
256 if (obj_desc->common.type == ACPI_TYPE_INTEGER) { 256 if (obj_desc->common.type == ACPI_TYPE_INTEGER) {
257 acpi_ex_integer_to_string(uid->string, obj_desc->integer.value); 257 acpi_ex_integer_to_string(uid->string, obj_desc->integer.value);
258 } else { 258 } else {
259 ACPI_STRCPY(uid->string, obj_desc->string.pointer); 259 strcpy(uid->string, obj_desc->string.pointer);
260 } 260 }
261 261
262 uid->length = length; 262 uid->length = length;
@@ -393,8 +393,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
393 393
394 /* Copy the String CID from the returned object */ 394 /* Copy the String CID from the returned object */
395 395
396 ACPI_STRCPY(next_id_string, 396 strcpy(next_id_string, cid_objects[i]->string.pointer);
397 cid_objects[i]->string.pointer);
398 length = cid_objects[i]->string.length + 1; 397 length = cid_objects[i]->string.length + 1;
399 } 398 }
400 399
diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c
index 28099e230008..71b66537f826 100644
--- a/drivers/acpi/acpica/utmisc.c
+++ b/drivers/acpi/acpica/utmisc.c
@@ -66,9 +66,9 @@ u8 acpi_ut_is_pci_root_bridge(char *id)
66 * Check if this is a PCI root bridge. 66 * Check if this is a PCI root bridge.
67 * ACPI 3.0+: check for a PCI Express root also. 67 * ACPI 3.0+: check for a PCI Express root also.
68 */ 68 */
69 if (!(ACPI_STRCMP(id, 69 if (!(strcmp(id,
70 PCI_ROOT_HID_STRING)) || 70 PCI_ROOT_HID_STRING)) ||
71 !(ACPI_STRCMP(id, PCI_EXPRESS_ROOT_HID_STRING))) { 71 !(strcmp(id, PCI_EXPRESS_ROOT_HID_STRING))) {
72 return (TRUE); 72 return (TRUE);
73 } 73 }
74 74
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c
index 44035abdbf29..8f3d203aed79 100644
--- a/drivers/acpi/acpica/utosi.c
+++ b/drivers/acpi/acpica/utosi.c
@@ -232,8 +232,7 @@ acpi_status acpi_ut_install_interface(acpi_string interface_name)
232 return (AE_NO_MEMORY); 232 return (AE_NO_MEMORY);
233 } 233 }
234 234
235 interface_info->name = 235 interface_info->name = ACPI_ALLOCATE_ZEROED(strlen(interface_name) + 1);
236 ACPI_ALLOCATE_ZEROED(ACPI_STRLEN(interface_name) + 1);
237 if (!interface_info->name) { 236 if (!interface_info->name) {
238 ACPI_FREE(interface_info); 237 ACPI_FREE(interface_info);
239 return (AE_NO_MEMORY); 238 return (AE_NO_MEMORY);
@@ -241,7 +240,7 @@ acpi_status acpi_ut_install_interface(acpi_string interface_name)
241 240
242 /* Initialize new info and insert at the head of the global list */ 241 /* Initialize new info and insert at the head of the global list */
243 242
244 ACPI_STRCPY(interface_info->name, interface_name); 243 strcpy(interface_info->name, interface_name);
245 interface_info->flags = ACPI_OSI_DYNAMIC; 244 interface_info->flags = ACPI_OSI_DYNAMIC;
246 interface_info->next = acpi_gbl_supported_interfaces; 245 interface_info->next = acpi_gbl_supported_interfaces;
247 246
@@ -269,7 +268,7 @@ acpi_status acpi_ut_remove_interface(acpi_string interface_name)
269 268
270 previous_interface = next_interface = acpi_gbl_supported_interfaces; 269 previous_interface = next_interface = acpi_gbl_supported_interfaces;
271 while (next_interface) { 270 while (next_interface) {
272 if (!ACPI_STRCMP(interface_name, next_interface->name)) { 271 if (!strcmp(interface_name, next_interface->name)) {
273 272
274 /* Found: name is in either the static list or was added at runtime */ 273 /* Found: name is in either the static list or was added at runtime */
275 274
@@ -373,7 +372,7 @@ struct acpi_interface_info *acpi_ut_get_interface(acpi_string interface_name)
373 372
374 next_interface = acpi_gbl_supported_interfaces; 373 next_interface = acpi_gbl_supported_interfaces;
375 while (next_interface) { 374 while (next_interface) {
376 if (!ACPI_STRCMP(interface_name, next_interface->name)) { 375 if (!strcmp(interface_name, next_interface->name)) {
377 return (next_interface); 376 return (next_interface);
378 } 377 }
379 378
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index 29e449935a82..97898ed71b4b 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -148,7 +148,7 @@ void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes)
148 u32 j; 148 u32 j;
149 149
150 if (!expected_btypes) { 150 if (!expected_btypes) {
151 ACPI_STRCPY(buffer, "NONE"); 151 strcpy(buffer, "NONE");
152 return; 152 return;
153 } 153 }
154 154
@@ -161,7 +161,7 @@ void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes)
161 /* If one of the expected types, concatenate the name of this type */ 161 /* If one of the expected types, concatenate the name of this type */
162 162
163 if (expected_btypes & this_rtype) { 163 if (expected_btypes & this_rtype) {
164 ACPI_STRCAT(buffer, &ut_rtype_names[i][j]); 164 strcat(buffer, &ut_rtype_names[i][j]);
165 j = 0; /* Use name separator from now on */ 165 j = 0; /* Use name separator from now on */
166 } 166 }
167 167
diff --git a/drivers/acpi/acpica/utprint.c b/drivers/acpi/acpica/utprint.c
index 2be6bd4bdc09..b26297c5de49 100644
--- a/drivers/acpi/acpica/utprint.c
+++ b/drivers/acpi/acpica/utprint.c
@@ -180,7 +180,7 @@ const char *acpi_ut_scan_number(const char *string, u64 *number_ptr)
180{ 180{
181 u64 number = 0; 181 u64 number = 0;
182 182
183 while (ACPI_IS_DIGIT(*string)) { 183 while (isdigit((int)*string)) {
184 number *= 10; 184 number *= 10;
185 number += *(string++) - '0'; 185 number += *(string++) - '0';
186 } 186 }
@@ -405,7 +405,7 @@ acpi_ut_vsnprintf(char *string,
405 /* Process width */ 405 /* Process width */
406 406
407 width = -1; 407 width = -1;
408 if (ACPI_IS_DIGIT(*format)) { 408 if (isdigit((int)*format)) {
409 format = acpi_ut_scan_number(format, &number); 409 format = acpi_ut_scan_number(format, &number);
410 width = (s32) number; 410 width = (s32) number;
411 } else if (*format == '*') { 411 } else if (*format == '*') {
@@ -422,7 +422,7 @@ acpi_ut_vsnprintf(char *string,
422 precision = -1; 422 precision = -1;
423 if (*format == '.') { 423 if (*format == '.') {
424 ++format; 424 ++format;
425 if (ACPI_IS_DIGIT(*format)) { 425 if (isdigit((int)*format)) {
426 format = acpi_ut_scan_number(format, &number); 426 format = acpi_ut_scan_number(format, &number);
427 precision = (s32) number; 427 precision = (s32) number;
428 } else if (*format == '*') { 428 } else if (*format == '*') {
diff --git a/drivers/acpi/acpica/utstring.c b/drivers/acpi/acpica/utstring.c
index 83b6c52490dc..8f3c883dfe0e 100644
--- a/drivers/acpi/acpica/utstring.c
+++ b/drivers/acpi/acpica/utstring.c
@@ -79,7 +79,7 @@ void acpi_ut_strlwr(char *src_string)
79 /* Walk entire string, lowercasing the letters */ 79 /* Walk entire string, lowercasing the letters */
80 80
81 for (string = src_string; *string; string++) { 81 for (string = src_string; *string; string++) {
82 *string = (char)ACPI_TOLOWER(*string); 82 *string = (char)tolower((int)*string);
83 } 83 }
84 84
85 return; 85 return;
@@ -145,7 +145,7 @@ void acpi_ut_strupr(char *src_string)
145 /* Walk entire string, uppercasing the letters */ 145 /* Walk entire string, uppercasing the letters */
146 146
147 for (string = src_string; *string; string++) { 147 for (string = src_string; *string; string++) {
148 *string = (char)ACPI_TOUPPER(*string); 148 *string = (char)toupper((int)*string);
149 } 149 }
150 150
151 return; 151 return;
@@ -202,7 +202,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
202 202
203 /* Skip over any white space in the buffer */ 203 /* Skip over any white space in the buffer */
204 204
205 while ((*string) && (ACPI_IS_SPACE(*string) || *string == '\t')) { 205 while ((*string) && (isspace((int)*string) || *string == '\t')) {
206 string++; 206 string++;
207 } 207 }
208 208
@@ -211,7 +211,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
211 * Base equal to ACPI_ANY_BASE means 'ToInteger operation case'. 211 * Base equal to ACPI_ANY_BASE means 'ToInteger operation case'.
212 * We need to determine if it is decimal or hexadecimal. 212 * We need to determine if it is decimal or hexadecimal.
213 */ 213 */
214 if ((*string == '0') && (ACPI_TOLOWER(*(string + 1)) == 'x')) { 214 if ((*string == '0') && (tolower((int)*(string + 1)) == 'x')) {
215 sign_of0x = 1; 215 sign_of0x = 1;
216 base = 16; 216 base = 16;
217 217
@@ -224,7 +224,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
224 224
225 /* Any string left? Check that '0x' is not followed by white space. */ 225 /* Any string left? Check that '0x' is not followed by white space. */
226 226
227 if (!(*string) || ACPI_IS_SPACE(*string) || *string == '\t') { 227 if (!(*string) || isspace((int)*string) || *string == '\t') {
228 if (to_integer_op) { 228 if (to_integer_op) {
229 goto error_exit; 229 goto error_exit;
230 } else { 230 } else {
@@ -241,7 +241,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
241 /* Main loop: convert the string to a 32- or 64-bit integer */ 241 /* Main loop: convert the string to a 32- or 64-bit integer */
242 242
243 while (*string) { 243 while (*string) {
244 if (ACPI_IS_DIGIT(*string)) { 244 if (isdigit((int)*string)) {
245 245
246 /* Convert ASCII 0-9 to Decimal value */ 246 /* Convert ASCII 0-9 to Decimal value */
247 247
@@ -252,8 +252,8 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
252 252
253 term = 1; 253 term = 1;
254 } else { 254 } else {
255 this_digit = (u8)ACPI_TOUPPER(*string); 255 this_digit = (u8)toupper((int)*string);
256 if (ACPI_IS_XDIGIT((char)this_digit)) { 256 if (isxdigit((int)this_digit)) {
257 257
258 /* Convert ASCII Hex char to value */ 258 /* Convert ASCII Hex char to value */
259 259
@@ -404,7 +404,7 @@ void acpi_ut_print_string(char *string, u16 max_length)
404 404
405 /* Check for printable character or hex escape */ 405 /* Check for printable character or hex escape */
406 406
407 if (ACPI_IS_PRINT(string[i])) { 407 if (isprint((int)string[i])) {
408 /* This is a normal character */ 408 /* This is a normal character */
409 409
410 acpi_os_printf("%c", (int)string[i]); 410 acpi_os_printf("%c", (int)string[i]);
@@ -609,22 +609,22 @@ void ut_convert_backslashes(char *pathname)
609u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source) 609u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source)
610{ 610{
611 611
612 if (ACPI_STRLEN(source) >= dest_size) { 612 if (strlen(source) >= dest_size) {
613 return (TRUE); 613 return (TRUE);
614 } 614 }
615 615
616 ACPI_STRCPY(dest, source); 616 strcpy(dest, source);
617 return (FALSE); 617 return (FALSE);
618} 618}
619 619
620u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source) 620u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source)
621{ 621{
622 622
623 if ((ACPI_STRLEN(dest) + ACPI_STRLEN(source)) >= dest_size) { 623 if ((strlen(dest) + strlen(source)) >= dest_size) {
624 return (TRUE); 624 return (TRUE);
625 } 625 }
626 626
627 ACPI_STRCAT(dest, source); 627 strcat(dest, source);
628 return (FALSE); 628 return (FALSE);
629} 629}
630 630
@@ -635,14 +635,13 @@ acpi_ut_safe_strncat(char *dest,
635{ 635{
636 acpi_size actual_transfer_length; 636 acpi_size actual_transfer_length;
637 637
638 actual_transfer_length = 638 actual_transfer_length = ACPI_MIN(max_transfer_length, strlen(source));
639 ACPI_MIN(max_transfer_length, ACPI_STRLEN(source));
640 639
641 if ((ACPI_STRLEN(dest) + actual_transfer_length) >= dest_size) { 640 if ((strlen(dest) + actual_transfer_length) >= dest_size) {
642 return (TRUE); 641 return (TRUE);
643 } 642 }
644 643
645 ACPI_STRNCAT(dest, source, max_transfer_length); 644 strncat(dest, source, max_transfer_length);
646 return (FALSE); 645 return (FALSE);
647} 646}
648#endif 647#endif
diff --git a/drivers/acpi/acpica/uttrack.c b/drivers/acpi/acpica/uttrack.c
index 130dd9f96f0f..9a7dc8196a5d 100644
--- a/drivers/acpi/acpica/uttrack.c
+++ b/drivers/acpi/acpica/uttrack.c
@@ -100,7 +100,7 @@ acpi_ut_create_list(char *list_name,
100 return (AE_NO_MEMORY); 100 return (AE_NO_MEMORY);
101 } 101 }
102 102
103 ACPI_MEMSET(cache, 0, sizeof(struct acpi_memory_list)); 103 memset(cache, 0, sizeof(struct acpi_memory_list));
104 104
105 cache->list_name = list_name; 105 cache->list_name = list_name;
106 cache->object_size = object_size; 106 cache->object_size = object_size;
@@ -402,7 +402,7 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation,
402 allocation->component = component; 402 allocation->component = component;
403 allocation->line = line; 403 allocation->line = line;
404 404
405 ACPI_STRNCPY(allocation->module, module, ACPI_MAX_MODULE_NAME); 405 strncpy(allocation->module, module, ACPI_MAX_MODULE_NAME);
406 allocation->module[ACPI_MAX_MODULE_NAME - 1] = 0; 406 allocation->module[ACPI_MAX_MODULE_NAME - 1] = 0;
407 407
408 if (!element) { 408 if (!element) {
@@ -497,7 +497,7 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
497 497
498 /* Mark the segment as deleted */ 498 /* Mark the segment as deleted */
499 499
500 ACPI_MEMSET(&allocation->user_space, 0xEA, allocation->size); 500 memset(&allocation->user_space, 0xEA, allocation->size);
501 501
502 status = acpi_ut_release_mutex(ACPI_MTX_MEMORY); 502 status = acpi_ut_release_mutex(ACPI_MTX_MEMORY);
503 return (status); 503 return (status);
@@ -595,7 +595,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
595 while (element) { 595 while (element) {
596 if ((element->component & component) && 596 if ((element->component & component) &&
597 ((module == NULL) 597 ((module == NULL)
598 || (0 == ACPI_STRCMP(module, element->module)))) { 598 || (0 == strcmp(module, element->module)))) {
599 descriptor = 599 descriptor =
600 ACPI_CAST_PTR(union acpi_descriptor, 600 ACPI_CAST_PTR(union acpi_descriptor,
601 &element->user_space); 601 &element->user_space);
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 0929187bdce0..51cf52d52243 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -234,8 +234,8 @@ acpi_status acpi_get_statistics(struct acpi_statistics *stats)
234 stats->sci_count = acpi_sci_count; 234 stats->sci_count = acpi_sci_count;
235 stats->gpe_count = acpi_gpe_count; 235 stats->gpe_count = acpi_gpe_count;
236 236
237 ACPI_MEMCPY(stats->fixed_event_count, acpi_fixed_event_count, 237 memcpy(stats->fixed_event_count, acpi_fixed_event_count,
238 sizeof(acpi_fixed_event_count)); 238 sizeof(acpi_fixed_event_count));
239 239
240 /* Other counters */ 240 /* Other counters */
241 241
@@ -322,7 +322,7 @@ acpi_status acpi_install_interface(acpi_string interface_name)
322 322
323 /* Parameter validation */ 323 /* Parameter validation */
324 324
325 if (!interface_name || (ACPI_STRLEN(interface_name) == 0)) { 325 if (!interface_name || (strlen(interface_name) == 0)) {
326 return (AE_BAD_PARAMETER); 326 return (AE_BAD_PARAMETER);
327 } 327 }
328 328
@@ -374,7 +374,7 @@ acpi_status acpi_remove_interface(acpi_string interface_name)
374 374
375 /* Parameter validation */ 375 /* Parameter validation */
376 376
377 if (!interface_name || (ACPI_STRLEN(interface_name) == 0)) { 377 if (!interface_name || (strlen(interface_name) == 0)) {
378 return (AE_BAD_PARAMETER); 378 return (AE_BAD_PARAMETER);
379 } 379 }
380 380