Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 86932cd

Browse files
prabhakarpujerirafaeljw
authored andcommitted
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>
1 parent 8c6294c commit 86932cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/cppc_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ static void cppc_find_dmi_mhz(const struct dmi_header *dm, void *private)
18391839
dm->length >= DMI_ENTRY_PROCESSOR_MIN_LENGTH) {
18401840
u16 val = (u16)get_unaligned((const u16 *)
18411841
(dmi_data + DMI_PROCESSOR_MAX_SPEED));
1842-
*mhz = val > *mhz ? val : *mhz;
1842+
*mhz = umax(val, *mhz);
18431843
}
18441844
}
18451845

0 commit comments

Comments
 (0)