dsa: Use str_enable_disable-like helpers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 15 Jan 2025 19:47:03 +0000 (20:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Jan 2025 09:23:25 +0000 (09:23 +0000)
commit544c9394065fdbb733349bcd1464087d6e12d28e
treed6a795426cd1373be8d11b679b428ef6178d38b9
parenta12c76a03386e32413ae8eaaefa337e491880632
dsa: Use str_enable_disable-like helpers

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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/pcs-639x.c
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/realtek/rtl8366rb.c