Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1492672
| Path | csiph.com!feeder.erje.net!1.us.feeder.erje.net!goblin1!goblin.stu.neva.ru!news.mixmin.net!news.unit0.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod |
|---|---|
| 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 | Wed, 28 Sep 2016 18:00:01 +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> |
| X-Mxl-Hash | 57ebe8b52af1289a-ebdaec614f9b4699171fed19c32cdd9b67e28004 |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | 7bit |
| X-Originating-IP | [10.17.20.45] |
| X-Clientproxiedby | ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) |
| X-Tm-As-Product-Ver | SMEX-11.0.0.1191-8.000.1202-22604.003 |
| X-Tm-As-Result | No--6.495000-8.000000-31 |
| X-Tm-As-User-Approved-Sender | No |
| X-Tm-As-User-Blocked-Sender | No |
| X-Analysisout | [v=2.1 cv=RNm1atW+ c=1 sm=1 tr=0 a=8P+NB+fYZDP74ap4g4d9Kw==] |
| X-Analysisout | [:17 a=fVG4DLb5TBsA:10 a=IkcTkHD0fZMA:10 a=GW1xBdLrtEIA:10 ] |
| X-Analysisout | [a=pGLkceISAAAA:8 a=NEAV23lmAAAA:8 a=0Tndwn54upzVTVVRaVgA:9] |
| X-Analysisout | [ a=QEXdDO2ut3YA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 a=Bn2pgwyD2vr] |
| X-Analysisout | [AyMmN8A2t:22] |
| X-Spam | [F=0.4051288731; CM=0.500; S=0.405(2015072901)] |
| X-Mail-From | <ecree@solarflare.com> |
| X-Source-IP | [193.34.186.16] |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <netdev@vger.kernel.org>, <linux-sctp@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <kuznet@ms2.inr.ac.ru>, <jmorris@namei.org>, <yoshfuji@linux-ipv6.org>, <kaber@trash.net>, <vyasevich@gmail.com>, <nhorman@tuxdriver.com>, <steffen.klassert@secunet.com>, <herbert@gondor.apana.org.au>, <marcelo.leitner@gmail.com> |
| X-Original-Date | Wed, 28 Sep 2016 16:58:22 +0100 |
| X-Original-Message-ID | <5734f230-eafa-45a1-9635-98721f872b38@solarflare.com> |
| X-Original-References | <1475043748-18161-1-git-send-email-hejianet@gmail.com> <20160928.050817.110671274247345232.davem@davemloft.net> <c44daa11-dc57-84fa-35cc-40ee0fe293f3@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1492672 |
Show key headers only | View raw
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