forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/acpi/acpica/exoparg2.c
....@@ -3,7 +3,7 @@
33 *
44 * Module Name: exoparg2 - AML execution - opcodes with 2 arguments
55 *
6
- * Copyright (C) 2000 - 2018, Intel Corp.
6
+ * Copyright (C) 2000 - 2020, Intel Corp.
77 *
88 *****************************************************************************/
99
....@@ -287,9 +287,9 @@
287287 * NOTE: A length of zero is ok, and will create a zero-length, null
288288 * terminated string.
289289 */
290
- while ((length < operand[0]->buffer.length) &&
291
- (length < operand[1]->integer.value) &&
292
- (operand[0]->buffer.pointer[length])) {
290
+ while ((length < operand[0]->buffer.length) && /* Length of input buffer */
291
+ (length < operand[1]->integer.value) && /* Length operand */
292
+ (operand[0]->buffer.pointer[length])) { /* Null terminator */
293293 length++;
294294 }
295295
....@@ -390,10 +390,10 @@
390390 /* Failure means that the Index was beyond the end of the object */
391391
392392 if (ACPI_FAILURE(status)) {
393
- ACPI_EXCEPTION((AE_INFO, status,
394
- "Index (0x%X%8.8X) is beyond end of object (length 0x%X)",
395
- ACPI_FORMAT_UINT64(index),
396
- (u32)length));
393
+ ACPI_BIOS_EXCEPTION((AE_INFO, status,
394
+ "Index (0x%X%8.8X) is beyond end of object (length 0x%X)",
395
+ ACPI_FORMAT_UINT64(index),
396
+ (u32)length));
397397 goto cleanup;
398398 }
399399