From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Peter Chen <peter.chen@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
usb-storage@lists.one-eyed-alien.net
Subject: Re: [PATCH 5/6] USB: gadget: Use str_enable_disable-like helpers
Date: Mon, 03 Feb 2025 14:14:09 +1030 [thread overview]
Message-ID: <ee2f8d2315e27e800643195bdacba9f88ce2d2c6.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20250114-str-enable-disable-usb-v1-5-c8405df47c19@linaro.org>
On Tue, 2025-01-14 at 21:05 +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@linaro.org>
> ---
> drivers/usb/gadget/function/f_ecm.c | 4 ++--
> drivers/usb/gadget/function/f_ncm.c | 3 ++-
> drivers/usb/gadget/function/u_serial.c | 3 ++-
> drivers/usb/gadget/legacy/inode.c | 3 ++-
> drivers/usb/gadget/udc/aspeed-vhub/hub.c | 3 ++-
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> #aspeed
next prev parent reply other threads:[~2025-02-03 3:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 20:05 [PATCH 0/6] USB: " Krzysztof Kozlowski
2025-01-14 20:05 ` [PATCH 1/6] USB: Replace own str_plural with common one Krzysztof Kozlowski
2025-01-14 20:05 ` [PATCH 2/6] USB: host: Use str_enable_disable-like helpers Krzysztof Kozlowski
2025-01-14 20:05 ` [PATCH 3/6] USB: typec: " Krzysztof Kozlowski
2025-01-16 12:19 ` Heikki Krogerus
2025-01-14 20:05 ` [PATCH 4/6] USB: phy: " Krzysztof Kozlowski
2025-01-14 20:05 ` [PATCH 5/6] USB: gadget: " Krzysztof Kozlowski
2025-02-03 3:44 ` Andrew Jeffery [this message]
2025-01-14 20:05 ` [PATCH 6/6] USB: " Krzysztof Kozlowski
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=ee2f8d2315e27e800643195bdacba9f88ce2d2c6.camel@codeconstruct.com.au \
--to=andrew@codeconstruct.com.au \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=daniel@zonque.org \
--cc=gregkh@linuxfoundation.org \
--cc=haojian.zhuang@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=nicolas.ferre@microchip.com \
--cc=peter.chen@kernel.org \
--cc=robert.jarzmik@free.fr \
--cc=stern@rowland.harvard.edu \
--cc=thierry.reding@gmail.com \
--cc=usb-storage@lists.one-eyed-alien.net \
/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®