diff options
author | Jiangshan Yi <yijiangshan@kylinos.cn> | 2023-04-20 09:42:47 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-07-10 15:21:03 +0200 |
commit | bac36a179a2b4163fa524de806afb04d639b6781 (patch) | |
tree | 02e6699a98e11a06247013608233390232d98401 /drivers/acpi/acpica | |
parent | ACPICA: Modify ACPI_STATE_COMMON (diff) | |
download | linux-bac36a179a2b4163fa524de806afb04d639b6781.tar.xz linux-bac36a179a2b4163fa524de806afb04d639b6781.zip |
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/2250f71f
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/exserial.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/exserial.c b/drivers/acpi/acpica/exserial.c index 5d99b1a76c83..5241f4c01c76 100644 --- a/drivers/acpi/acpica/exserial.c +++ b/drivers/acpi/acpica/exserial.c @@ -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 */ |