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:   Thu, 20 Jul 2017 15:47:09 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Marcel Holtmann <marcel@...tmann.org>
Cc:     "Gustavo F. Padovan" <gustavo@...ovan.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        "open list:BLUETOOTH DRIVERS" <linux-bluetooth@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bluetooth: btwilink: remove unnecessary static in
 bt_ti_probe()

Hi Marcel,

On 07/20/2017 04:20 AM, Marcel Holtmann wrote:
> Hi Gustavo,
>
>> Remove unnecessary static on local variable hst.
>> Such variable is initialized before being used,
>> on every execution path throughout the function.
>> The static has no benefit and, removing it reduces
>> the object file size.
>>
>> This issue was detected using Coccinelle and the
>> following semantic patch:
>>
>> @bad exists@
>> position p;
>> identifier x;
>> type T;
>> @@
>>
>> static T x@p;
>> ...
>> x = <+...x...+>
>>
>> @@
>> identifier x;
>> expression e;
>> type T;
>> position p != bad.p;
>> @@
>>
>> -static
>> T x@p;
>> ... when != x
>>     when strict
>> ?x = e;
>>
>> In the following log you can see the difference in the object file size.
>> This log is the output of the size command, before and after the code
>> change:
>>
>> before:
>>   text    data     bss     dec     hex filename
>>   4029    2528     128    6685    1a1d drivers/bluetooth/btwilink.o
>>
>> after:
>>   text    data     bss     dec     hex filename
>>   4007    2472      64    6543    198f drivers/bluetooth/btwilink.o
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
>> ---
>> drivers/bluetooth/btwilink.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> patch has been applied to bluetooth-next tree.
>

Great, thanks!

-- 
Gustavo A. R. Silva

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ