Re: [Linux-stm32] [PATCH] pinctrl: Use str_enable_disable-like helpers

From: Antonio Borneo
Date: Wed Jan 15 2025 - 04:43:56 EST


On Tue, 2025-01-14 at 21:36 +0100, 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>
> ---
>  drivers/pinctrl/bcm/pinctrl-nsp-gpio.c     |  3 ++-
>  drivers/pinctrl/cirrus/pinctrl-lochnagar.c |  3 ++-
>  drivers/pinctrl/nomadik/pinctrl-abx500.c   |  5 +++--
>  drivers/pinctrl/nomadik/pinctrl-nomadik.c  |  7 ++++---
>  drivers/pinctrl/pinctrl-amd.c              |  3 ++-
>  drivers/pinctrl/pinctrl-gemini.c           | 11 ++++++-----
>  drivers/pinctrl/pinctrl-stmfx.c            |  2 +-
>  drivers/pinctrl/qcom/pinctrl-msm.c         |  3 ++-
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c   |  3 ++-
>  drivers/pinctrl/qcom/pinctrl-spmi-mpp.c    |  3 ++-
>  drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c   |  3 ++-
>  drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c    | 10 ++++------
>  drivers/pinctrl/samsung/pinctrl-exynos.c   |  3 ++-
>  drivers/pinctrl/stm32/pinctrl-stm32.c      |  5 +++--

For pinctrl-stmfx and for pinctrl-stm32:

Reviewed-by: Antonio Borneo <antonio.borneo@xxxxxxxxxxx>
---
Antonio