1

ACPI: CPPC: Replace ternary operator with umax()

Replace ternary operator with umax() in cppc_find_dmi_mhz().

Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@gmail.com>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20240626130941.1527127-2-prabhakar.pujeri@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Prabhakar Pujeri 2024-06-26 09:09:40 -04:00 committed by Rafael J. Wysocki
parent 8c6294ccb5
commit 86932cd8cc

View File

@ -1839,7 +1839,7 @@ static void cppc_find_dmi_mhz(const struct dmi_header *dm, void *private)
dm->length >= DMI_ENTRY_PROCESSOR_MIN_LENGTH) {
u16 val = (u16)get_unaligned((const u16 *)
(dmi_data + DMI_PROCESSOR_MAX_SPEED));
*mhz = val > *mhz ? val : *mhz;
*mhz = umax(val, *mhz);
}
}