public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Linux Kernel Trivial Patch Monkey <trivial@rustcorp.com.au>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH 0/30] return statement cleanup - kill pointless parentheses
Date: Thu, 16 Dec 2004 11:16:31 +0100	[thread overview]
Message-ID: <200412161116.31607.arnd@arndb.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0412160010550.3864@dragon.hygekrogen.localhost>

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

On Dunnersdag 16 Dezember 2004 01:02, Jesper Juhl wrote:
> If these patches are generally acceted then I think it would make sense to 
> make a small addition to Documentation/CodingStyle mentioning the prefered 
> form of return statements, so we (hopefully) won't have to do cleanups 
> like this too often in the future.
> Below I've included a proposed patch adding such a bit to CodingStyle.

I think the change in Documentation/CodingStyle is useful, even though I
don't really like changing all the existing code without going through
the respective maintainers.

> 1) the parentheses are pointless.
> 2) removing the parentheses decreases source file size slightly.
> 3) they look odd and when reading code you don't want to be stopped wondering
>    - no parentheses is simply more readable (at least to me). 
> 4) When I've submitted patches for other stuff in the past I've a few times
>    been asked if I could fix up the return statements while I was at it - so
>    it seems to be wanted.  

This is basically the same category as the first three chapters of
CodingStyle. It's not nice to read, but there is no real problem in the 
code. Think of these issues as whitespace fixes: you are making the job
harder for code maintainers for very little gain. I would suggest that
you submit these patches only to the code maintainers, not to the Trivial
Patch Monkey or Andrew.

Or even better, change scripts/Lindent to do the change automatically for
code that it is used on, if that can be done in a reliable way.

 Arnd <><



[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-12-16 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16  0:02 [PATCH 0/30] return statement cleanup - kill pointless parentheses Jesper Juhl
2004-12-16  1:00 ` Pavel Machek
2004-12-16  1:16   ` Jesper Juhl
2004-12-16 10:16 ` Arnd Bergmann [this message]
2004-12-16 14:27   ` [PATCH 0/30] return statement cleanup - kill pointless parent heses Jesper Juhl

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=200412161116.31607.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@osdl.org \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox