From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Rob Clark <robdclark@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
<linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/msm: Use str_enable_disable-like helpers
Date: Wed, 15 Jan 2025 13:15:26 -0800 [thread overview]
Message-ID: <b2f8e0b4-b8f1-4e90-be2d-715fbd89a1e3@quicinc.com> (raw)
In-Reply-To: <20250114191724.861601-1-krzysztof.kozlowski@linaro.org>
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@linaro.org>
> ---
> .../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@quicinc.com>
next prev parent reply other threads:[~2025-01-15 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 19:17 Krzysztof Kozlowski
2025-01-15 21:15 ` Abhinav Kumar [this message]
2025-02-27 4:37 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2f8e0b4-b8f1-4e90-be2d-715fbd89a1e3@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®