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]
Date:   Mon, 12 Mar 2018 10:27:16 -0500
From:   Rob Herring <robh@...nel.org>
To:     Frank Rowand <frowand.list@...il.com>
Cc:     Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH 1/2] of: unittest: remove unneeded local return value variables

On Fri, Mar 9, 2018 at 7:28 PM, Frank Rowand <frowand.list@...il.com> wrote:
> On 03/09/18 16:02, Rob Herring wrote:
>> On Thu, Mar 08, 2018 at 02:39:04PM -0800, frowand.list@...il.com wrote:
>>> From: Frank Rowand <frank.rowand@...y.com>
>>>
>>> A common pattern in many unittest functions is to save the return
>>> value of a function in a local variable, then test the value of
>>> the local variable, without using that return value for any further
>>> purpose.  Remove the local return value variable for these cases.
>>>
>>> A second common pattern is:
>>>
>>>    ret = some_test_function(many, parameters, ...);
>>>    if (unittest(ret == 0, "error message format", ...))
>>>       return;
>>>
>>> This pattern is more clear when the local variable 'ret' is used, due
>>> to the long lines caused by the parameters to the test function and
>>> the long format and data parameters of unittest().  The local
>>> variable is retained in these cases.
>>>
>>> Signed-off-by: Frank Rowand <frank.rowand@...y.com>
>>> ---
>>>  drivers/of/unittest.c | 89 ++++++++++++++-------------------------------------
>>>  1 file changed, 24 insertions(+), 65 deletions(-)
>>
>> Doesn't apply. What's it based on?
>>
>> Rob
>>
>
> Sorry, I guess I should have mentioned that.
>
> Based on top of of_overlay_fdt_apply() v7 for 4.17.
>
> It applies with or without Dan's "[PATCH] of: unittest: fix
> an error test in of_unittest_overlay_8()", which made me notice
> the common pattern.

That's what I figured, but I was not on the right branch... Now both
are applied.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ