lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ee2f8d2315e27e800643195bdacba9f88ce2d2c6.camel@codeconstruct.com.au>
Date: Mon, 03 Feb 2025 14:14:09 +1030
From: Andrew Jeffery <andrew@...econstruct.com.au>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, Mathias Nyman <mathias.nyman@...el.com>, 
 Thierry Reding <thierry.reding@...il.com>, Jonathan Hunter
 <jonathanh@...dia.com>, Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
 Nicolas Ferre <nicolas.ferre@...rochip.com>,  Alexandre Belloni
 <alexandre.belloni@...tlin.com>, Claudiu Beznea <claudiu.beznea@...on.dev>,
 Daniel Mack <daniel@...que.org>, Haojian Zhuang <haojian.zhuang@...il.com>,
 Robert Jarzmik <robert.jarzmik@...e.fr>, Peter Chen
 <peter.chen@...nel.org>, Linus Walleij <linus.walleij@...aro.org>, Alan
 Stern <stern@...land.harvard.edu>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, 
	usb-storage@...ts.one-eyed-alien.net
Subject: Re: [PATCH 5/6] USB: gadget: Use str_enable_disable-like helpers

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@...aro.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@...econstruct.com.au> #aspeed


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ