Re: [PATCH] drm/msm: Use str_enable_disable-like helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/14/2025 11:17 AM, Krzysztof Kozlowski wrote:
Replace ternary (condition ? "enable" : "disable") syntax with helpers
from string_choices.h because:
1. Simple function call with one argument is easier to read.  Ternary
    operator has three arguments and with wrapping might lead to quite
    long code.
2. Is slightly shorter thus also easier to read.
3. It brings uniformity in the text - same string.
4. Allows deduping by the linker, which results in a smaller binary
    file.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
---
  .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c  |  5 ++--
  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c      |  3 ++-
  drivers/gpu/drm/msm/dp/dp_ctrl.c              | 25 ++++++++++---------
  drivers/gpu/drm/msm/dp/dp_display.c           |  4 +--
  drivers/gpu/drm/msm/dp/dp_drm.c               |  5 ++--
  5 files changed, 23 insertions(+), 19 deletions(-)


Interesting helper str_true_false :)

LGTM,

Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux