Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1492672
| From | Edward Cree <ecree@solarflare.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Local variable ordering (was Re: [PATCH v5 0/7] Reduce cache miss for snmp_fold_field) |
| Date | 2016-09-28 18:00 +0200 |
| Message-ID | <smpr3-eS-3@gated-at.bofh.it> (permalink) |
| References | <smgxr-3cB-3@gated-at.bofh.it> <smjvl-4WB-79@gated-at.bofh.it> <smnpf-7q5-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 28/09/16 14:45, hejianet wrote:
>
>
> On 9/28/16 5:08 PM, David Miller wrote:
>> From: Jia He <hejianet@gmail.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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v5 0/7] Reduce cache miss for snmp_fold_field Jia He <hejianet@gmail.com> - 2016-09-28 08:30 +0200
[PATCH v5 6/7] ipv6: Remove useless parameter in __snmp6_fill_statsdev Jia He <hejianet@gmail.com> - 2016-09-28 08:30 +0200
[PATCH v5 5/7] proc: Reduce cache miss in xfrm_statistics_seq_show Jia He <hejianet@gmail.com> - 2016-09-28 08:30 +0200
[PATCH v5 7/7] net: Suppress the "Comparison to NULL could be written" warnings Jia He <hejianet@gmail.com> - 2016-09-28 08:30 +0200
[PATCH v5 3/7] proc: Reduce cache miss in snmp6_seq_show Jia He <hejianet@gmail.com> - 2016-09-28 08:30 +0200
Re: [PATCH v5 0/7] Reduce cache miss for snmp_fold_field David Miller <davem@davemloft.net> - 2016-09-28 11:40 +0200
Re: [PATCH v5 0/7] Reduce cache miss for snmp_fold_field hejianet <hejianet@gmail.com> - 2016-09-28 15:50 +0200
Local variable ordering (was Re: [PATCH v5 0/7] Reduce cache miss for snmp_fold_field) Edward Cree <ecree@solarflare.com> - 2016-09-28 18:00 +0200
csiph-web