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: <5734f230-eafa-45a1-9635-98721f872b38@solarflare.com>
Date:   Wed, 28 Sep 2016 16:58:22 +0100
From:   Edward Cree <ecree@...arflare.com>
To:     hejianet <hejianet@...il.com>
CC:     <netdev@...r.kernel.org>, <linux-sctp@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kuznet@....inr.ac.ru>,
        <jmorris@...ei.org>, <yoshfuji@...ux-ipv6.org>, <kaber@...sh.net>,
        <vyasevich@...il.com>, <nhorman@...driver.com>,
        <steffen.klassert@...unet.com>, <herbert@...dor.apana.org.au>,
        <marcelo.leitner@...il.com>
Subject: Local variable ordering (was Re: [PATCH v5 0/7] Reduce cache miss for
 snmp_fold_field)

On 28/09/16 14:45, hejianet wrote:
>
>
> On 9/28/16 5:08 PM, David Miller wrote:
>> From: Jia He <hejianet@...il.com>
>> Date: Wed, 28 Sep 2016 14:22:21 +0800
>>
>>> v5:
>>> - order local variables from longest to shortest line
>> I still see many cases where this problem still exists.  Please
>> do not resubmit this patch series until you fix all of them.
>>
>> Patch #2:
>>
>> -static int snmp_seq_show(struct seq_file *seq, void *v)
>> +static int snmp_seq_show_ipstats(struct seq_file *seq, void *v)
>>   {
>>       int i;
>> +    u64 buff64[IPSTATS_MIB_MAX];
>>       struct net *net = seq->private;
>>
>> The order should be "net" then "buff64" then "i".
> Sorry for my bad eyesight and quick hand :(
> B.R.
> Jia
A few months back I wrote a script to help find these:
https://github.com/ecree-solarflare/xmastree
It can check a source file or a patch.
Posting in the hope that people will find it useful.

-Ed

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ