summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorPrabhakar Pujeri <prabhakar.pujeri@gmail.com>2024-06-26 09:09:40 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-07-02 21:01:08 +0200
commit86932cd8ccd4add4ddb3e894a0c4471aab8233c2 (patch)
tree2d8e82c4c4277f0ad1d835113c3fedbc45d70ae0 /drivers/acpi
parent8c6294ccb56830fcd573461ddd27a1f32198216a (diff)
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/cppc_acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 9976bb57356e..dd3d3082c8c7 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -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);
}
}