]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
USB: Use str_enable_disable-like helpers
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 14 Jan 2025 20:05:39 +0000 (21:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2025 17:28:13 +0000 (18:28 +0100)
commitf386bfad038d07fc356df267592f5fd812c8cf3e
tree8a3210bf4c1fe4e3d193633c3f8f613894057aa4
parent5b6dc50e9ed870fffbf2ae6de77b30fb0d15eab8
USB: 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>
Link: https://lore.kernel.org/r/20250114-str-enable-disable-usb-v1-6-c8405df47c19@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
drivers/usb/cdns3/cdnsp-gadget.c
drivers/usb/chipidea/host.c
drivers/usb/common/usb-conn-gpio.c
drivers/usb/core/hub.c
drivers/usb/core/port.c
drivers/usb/fotg210/fotg210-core.c
drivers/usb/mtu3/mtu3_debugfs.c
drivers/usb/mtu3/mtu3_dr.c
drivers/usb/mtu3/mtu3_gadget.c
drivers/usb/musb/da8xx.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_dsps.c
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_host.c
drivers/usb/storage/shuttle_usbat.c
drivers/usb/usbip/vhci_hcd.c