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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878sq4db27.fsf@intel.com>
Date:   Tue, 01 Oct 2019 13:17:36 +0300
From:   Jani Nikula <jani.nikula@...el.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-usb@...r.kernel.org, netdev@...r.kernel.org,
        intel-gfx@...ts.freedesktop.org,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        linux-kernel@...r.kernel.org, Julia Lawall <julia.lawall@...6.fr>,
        Vishal Kulkarni <vishal@...lsio.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Intel-gfx] [PATCH v3] string-choice: add yesno(), onoff(), enableddisabled(), plural() helpers

On Tue, 01 Oct 2019, Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
> On Tue, Oct 01, 2019 at 12:42:34PM +0300, Jani Nikula wrote:
>> On Tue, 01 Oct 2019, Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
>> > On Tue, Oct 01, 2019 at 11:07:39AM +0300, Jani Nikula wrote:
>> >> The kernel has plenty of ternary operators to choose between constant
>> >> strings, such as condition ? "yes" : "no", as well as value == 1 ? "" :
>> >> "s":
>> >> 
>> >> $ git grep '? "yes" : "no"' | wc -l
>> >> 258
>> >> $ git grep '? "on" : "off"' | wc -l
>> >> 204
>> >> $ git grep '? "enabled" : "disabled"' | wc -l
>> >> 196
>> >> $ git grep '? "" : "s"' | wc -l
>> >> 25
>> >> 
>> >> Additionally, there are some occurences of the same in reverse order,
>> >> split to multiple lines, or otherwise not caught by the simple grep.
>> >> 
>> >> Add helpers to return the constant strings. Remove existing equivalent
>> >> and conflicting functions in i915, cxgb4, and USB core. Further
>> >> conversion can be done incrementally.
>> >> 
>> >> While the main goal here is to abstract recurring patterns, and slightly
>> >> clean up the code base by not open coding the ternary operators, there
>> >> are also some space savings to be had via better string constant
>> >> pooling.
>> >> 
>> >> Cc: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
>> >> Cc: Rodrigo Vivi <rodrigo.vivi@...el.com>
>> >> Cc: intel-gfx@...ts.freedesktop.org
>> >> Cc: Vishal Kulkarni <vishal@...lsio.com>
>> >> Cc: netdev@...r.kernel.org
>> >> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>> >> Cc: linux-usb@...r.kernel.org
>> >> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> >> Cc: linux-kernel@...r.kernel.org
>> >> Cc: Julia Lawall <julia.lawall@...6.fr>
>> >> Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
>> >> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org> # v1
>> >
>> > As this is a totally different version, please drop my reviewed-by as
>> > that's really not true here :(
>> 
>> I did indicate it was for v1. Indeed v2 was different, but care to
>> elaborate what's wrong with v3?
>
> No idea, but I haven't reviewed it yet, so to put my tag on there isn't
> the nicest...

Apologies, no harm intended.

At times, I've seen the "# vN" notation used, I suppose both to indicate
that the *ideas* presented in the earlier version warranted Reviewed-by
from so-and-so, though this particular version still needs detailed
review, and that the approval of the reviewer of the earlier version
should be sought out before merging a subsequent version.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ