From: Michal Simek <michal.simek@xilinx.com>
To: Joe Perches <joe@perches.com>,
Michal Simek <michal.simek@xilinx.com>,
Julia Lawall <julia.lawall@lip6.fr>
Cc: <linux-kernel@vger.kernel.org>,
Markus Elfring <elfring@users.sourceforge.net>
Subject: Re: [PATCH v2] net: ll_temac: Use one return statement instead of two
Date: Mon, 11 May 2015 17:44:15 +0200 [thread overview]
Message-ID: <5550CE4F.2070404@xilinx.com> (raw)
In-Reply-To: <1431358794.2884.17.camel@perches.com>
On 05/11/2015 05:39 PM, Joe Perches wrote:
> On Mon, 2015-05-11 at 17:26 +0200, Michal Simek wrote:
>> On 05/11/2015 04:42 PM, Joe Perches wrote:
>>> On Mon, 2015-05-11 at 16:05 +0200, Michal Simek wrote:
>>>> Use one return statement instead of two to simplify the code.
>>>> Both are returning the same value.
>>>
>>> trivia and FYI:
>>
>> But still correct right?
>
> Yes.
Does this mean that you have added me your ACK?
>>> I think there are about 100 of these in kernel tree
>>> and I'm not going to submit patches.
>>>
>>> $ grep-2.5.4 -rP --include=*.[ch] -n "^([\t]+)\treturn[ \t]+([A-Za-z0-9\_\>\(\)\.\>\[\]\-]+);\n(\1}\n)?\1return[ \t]+\2;" * | \
>>> grep -P "^[\w\/\.]+:\d+:"
>>
>> Are you suggesting that someone else should send patches for it?
>
> I get enough grief for doing style oriented patches,
> so if someone else wants to, sure.
yep - the only reason I have submitted this was that this is the diff in
the xilinx tree compare to mainline and I don't want to simple revert it
because it is correct.
>> I expect that this is something what Julia can check with coccinelle
>> and can be added to scripts folder.
>
> Maybe true.
>
> A coccinelle script might be rather more complicated
> than the simpler grep above, but perhaps the script
> could be a bit more complete as it could likely look
> at more code indentation styles.
Julia: Any comment?
Thanks,
Michal
next prev parent reply other threads:[~2015-05-11 15:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 14:05 [PATCH v2] net: ll_temac: Use one return statement instead of two Michal Simek
2015-05-11 14:05 ` Michal Simek
2015-05-11 14:42 ` Joe Perches
2015-05-11 15:26 ` Michal Simek
2015-05-11 15:39 ` Joe Perches
2015-05-11 15:44 ` Michal Simek [this message]
2015-05-11 15:48 ` Julia Lawall
2015-05-11 16:00 ` Joe Perches
2015-05-12 5:23 ` Julia Lawall
2015-05-11 16:10 ` Joe Perches
2015-05-11 16:12 ` Michal Simek
2015-05-11 15:42 ` Julia Lawall
2015-05-11 18:16 ` David Miller
2015-05-11 18:16 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5550CE4F.2070404@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=elfring@users.sourceforge.net \
--cc=joe@perches.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.