Skip to content

ACPI: Replace Ternary Operations with min()/max() Macros

Prabhakar Pujeri linux-acpi llvm oe-kbuild-all 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 1 replyApplied

Changes in v2 from the cover letter

- fix: replace max() to umax() for unsigned integer

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ACPI: CPPC: Replace ternary operator with max() in cppc_find_dmi_mhzdrivers/acpi/cppc_acpi.c+1 -10 replies
2/2ACPI: PM: Use max() for clearer D3 state selection in acpi_dev_pm_get_statedrivers/acpi/device_pm.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] ACPI: Replace Ternary Operations with min()/max() Macros

Hi all,

This patch series, generated using Coccinelle, aims to improve code readability and maintainability by replacing ternary operations with the min() and max() macros where applicable in the ACPI subsystem.

The patches have been compiled and tested on an x86_64 system.

Changes in v2:
- fix: replace max() to umax() for unsigned integer

Prabhakar Pujeri (2):
ACPI: CPPC: Replace ternary operator with max() in cppc_find_dmi_mhz
ACPI: PM: Use max() for clearer D3 state selection in
acpi_dev_pm_get_state

 drivers/acpi/cppc_acpi.c | 2 +-
 drivers/acpi/device_pm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.45.2