Commit bac36a17 authored by Jiangshan Yi's avatar Jiangshan Yi Committed by Rafael J. Wysocki

ACPICA: exserial.c: replace ternary operator with ACPI_MIN()

ACPICA commit 2250f71fe77396db21df805222ffcbf19e1e7896

Make the code simpler and more readable.

Link: https://github.com/acpica/acpica/commit/2250f71fSigned-off-by: default avatarJiangshan Yi <yijiangshan@kylinos.cn>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 4f1094ba
......@@ -343,8 +343,7 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
/* Copy the input buffer data to the transfer buffer */
buffer = buffer_desc->buffer.pointer;
data_length = (buffer_length < source_desc->buffer.length ?
buffer_length : source_desc->buffer.length);
data_length = ACPI_MIN(buffer_length, source_desc->buffer.length);
memcpy(buffer, source_desc->buffer.pointer, data_length);
/* Lock entire transaction if requested */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment