Skip to content

Commit bac36a1

Browse files
Jiangshan Yirafaeljw
authored andcommitted
ACPICA: exserial.c: replace ternary operator with ACPI_MIN()
ACPICA commit 2250f71fe77396db21df805222ffcbf19e1e7896 Make the code simpler and more readable. Link: acpica/acpica@2250f71f Signed-off-by: Jiangshan Yi <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4f1094b commit bac36a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/acpi/acpica/exserial.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ acpi_ex_write_serial_bus(union acpi_operand_object *source_desc,
343343
/* Copy the input buffer data to the transfer buffer */
344344

345345
buffer = buffer_desc->buffer.pointer;
346-
data_length = (buffer_length < source_desc->buffer.length ?
347-
buffer_length : source_desc->buffer.length);
346+
data_length = ACPI_MIN(buffer_length, source_desc->buffer.length);
348347
memcpy(buffer, source_desc->buffer.pointer, data_length);
349348

350349
/* Lock entire transaction if requested */

0 commit comments

Comments
 (0)