All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Michael Cree <mcree@orcon.net.nz>
Cc: Matt Turner <mattst88@gmail.com>,
	Jiri Kosina <trivial@kernel.org>,
	Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/39] arch/alpha: Update WARN uses
Date: Sat, 30 Oct 2010 18:38:59 -0700	[thread overview]
Message-ID: <1288489139.366.169.camel@Joe-Laptop> (raw)
In-Reply-To: <4CCCC224.50007@orcon.net.nz>

On Sun, 2010-10-31 at 14:11 +1300, Michael Cree wrote:
> On 31/10/10 10:28, Joe Perches wrote:
> > On Sat, 2010-10-30 at 17:17 -0400, Matt Turner wrote:
> >> On Sat, Oct 30, 2010 at 5:08 PM, Joe Perches<joe@perches.com>  wrote:
> >>> Coalesce long formats.
> >>> Align arguments.
> >> What's accomplished here? It looks like you joined two strings (which
> >> were separated as to not overflow the 80-char limit) and spaced a
> >> couple lines over.
> > This one is just a whitespace cleanup.
> > Ignore it or nack it if you want.
> I prefer the original indenting as it clearly stands the `1' on its own 
> thus emphasising that the warning will be printed everytime the WARN() 
> statement is executed.  I surmise that the original programmer thought 
> it important to emphasise this as it might not be considered the 
> "normal" usage of WARN().

Actually, WARN(1, foo) is by far the most common use of WARN.
More than half of all uses.

$ grep -rP --include=*.[ch] -oh "\bWARN\s*\(" * | wc -l
286
$ grep -rP --include=*.[ch] -oh "\bWARN\s*\(\w+" * | \
	sort | uniq -c | sort -rn | head -5
    173 WARN(1
      8 WARN(IS_ERR
      4 WARN(ret
      4 WARN(priv
      4 WARN(local

> The moral here is that when a _competent_ programmer breaks the "style 
> guide" they are most likely doing so for a very good reason.  Thus, 
> those who would submit whitespace fix patches should take time to ask 
> themselves why the original programmer has laid out the code in such a 
> fashion and learn from it, before submitting so-called "fixes".

Code is decidedly not music.

This stuff is mostly craft not art and consistency in
craft has value.

You might also note I didn't call it a fix, I called it
a whitespace cleanup.

And again, I don't much care if it's applied to
arch/alpha or not.  I haven't had an alpha since I gave
away my AlphaStation a decade ago.


  reply	other threads:[~2010-10-31  1:39 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-30 21:08 [PATCH 00/39] Cleanup WARN #defines Joe Perches
2010-10-30 21:08 ` Joe Perches
2010-10-30 21:08 ` Joe Perches
2010-10-30 21:08 ` Joe Perches
2010-10-30 21:08 ` Joe Perches
2010-10-30 21:08 ` [PATCH 01/39] include/asm-generic/bug.h: Update WARN macros Joe Perches
2010-10-30 21:08 ` [PATCH 02/39] arch/alpha: Update WARN uses Joe Perches
2010-10-30 21:17   ` Matt Turner
2010-10-30 21:28     ` Joe Perches
2010-10-31  1:11       ` Michael Cree
2010-10-31  1:38         ` Joe Perches [this message]
2010-10-30 21:08 ` [PATCH 03/39] arch/arm: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-30 21:08 ` [PATCH 04/39] arch/powerpc: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-11-01 11:02   ` Michael Ellerman
2010-11-01 11:02     ` Michael Ellerman
2010-11-01 14:41     ` Joe Perches
2010-11-01 14:41       ` Joe Perches
2010-11-02  0:26       ` Michael Ellerman
2010-11-02  0:26         ` Michael Ellerman
2010-11-02  1:50         ` Joe Perches
2010-11-02  1:50           ` Joe Perches
2010-11-02  3:20           ` Michael Ellerman
2010-11-02  3:20             ` Michael Ellerman
2010-10-30 21:08 ` [PATCH 05/39] arch/x86: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-31  1:38   ` Rafael J. Wysocki
2010-10-31  1:38   ` Rafael J. Wysocki
2010-10-30 21:08 ` [PATCH 06/39] drivers/acpi: " Joe Perches
2010-10-30 21:08 ` [PATCH 07/39] drivers/base: " Joe Perches
2010-10-30 21:08 ` [PATCH 08/39] drivers/block: " Joe Perches
2010-10-30 21:08 ` [PATCH 09/39] drivers/cpuidle: " Joe Perches
2010-10-30 21:08 ` [PATCH 10/39] drivers/firewire: " Joe Perches
2010-10-30 21:57   ` Stefan Richter
2010-10-30 21:08 ` [PATCH 11/39] drivers/firmware: " Joe Perches
2010-10-30 21:08 ` [PATCH 12/39] drivers/gpio: " Joe Perches
2010-10-30 21:08 ` [PATCH 13/39] drivers/gpu/drm: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-30 21:08 ` [PATCH 14/39] drivers/media/video: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-30 21:08 ` [PATCH 15/39] drivers/mfd: " Joe Perches
2010-11-26 10:02   ` Samuel Ortiz
2010-10-30 21:08 ` [PATCH 16/39] drivers/net/can: " Joe Perches
2010-11-09 17:23   ` David Miller
2010-11-09 17:23     ` David Miller
2010-10-30 21:08 ` [PATCH 17/39] drivers/net/usb: " Joe Perches
2010-11-09 17:23   ` David Miller
2010-10-30 21:08 ` [PATCH 18/39] drivers/net/wireless/iwlwifi: " Joe Perches
2010-10-30 21:08 ` [PATCH 19/39] drivers/regulator: " Joe Perches
2010-11-01 13:25   ` Mark Brown
2010-10-30 21:08 ` [PATCH 20/39] drivers/scsi/fcoe: " Joe Perches
2010-10-30 21:08 ` [PATCH 21/39] drivers/staging: " Joe Perches
2010-11-09 23:50   ` Greg KH
2010-10-30 21:08 ` [PATCH 22/39] drivers/usb/musb: " Joe Perches
2010-11-05 11:44   ` Felipe Balbi
2010-11-05 13:54     ` Jiri Kosina
2010-11-05 13:56       ` Felipe Balbi
2010-10-30 21:08 ` [PATCH 23/39] drivers/video/omap2/dss: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-30 21:08 ` [PATCH 24/39] fs/nfsd: " Joe Perches
2010-10-30 21:08 ` [PATCH 25/39] fs/notify/inotify: " Joe Perches
2010-10-30 21:08 ` [PATCH 26/39] fs/sysfs: " Joe Perches
2010-10-30 21:08 ` [PATCH 27/39] fs/proc: " Joe Perches
2010-10-30 21:08 ` [PATCH 28/39] fs: " Joe Perches
2010-10-30 21:08 ` [PATCH 29/39] include/linux/device.h: " Joe Perches
2010-10-30 21:08 ` [PATCH 30/39] kernel/irq: " Joe Perches
2010-10-30 21:08 ` [PATCH 31/39] kernel/panic.c: Update warn_slowpath to use %pV Joe Perches
2010-10-30 21:08 ` [PATCH 32/39] kernel: Update WARN uses Joe Perches
2010-10-30 21:08 ` [PATCH 33/39] lib: " Joe Perches
2010-10-30 21:08 ` [PATCH 34/39] mm: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-11-08 12:03   ` Michał Nazarewicz
2010-11-08 12:03     ` Michał Nazarewicz
2010-10-30 21:08 ` [PATCH 35/39] net/core/dev.c: " Joe Perches
2010-11-09 17:23   ` David Miller
2010-10-30 21:08 ` [PATCH 36/39] net/ipv4/tcp.c: " Joe Perches
2010-11-09 17:23   ` David Miller
2010-10-30 21:08 ` [PATCH 37/39] net/mac80211: " Joe Perches
2010-10-30 21:08   ` Joe Perches
2010-10-31  7:33   ` Johannes Berg
2010-10-30 21:08 ` [PATCH 38/39] net/rfkill/input.c: " Joe Perches
2010-10-30 21:08 ` [PATCH 39/39] sound/soc/codecs/wm_hubs.c: " Joe Perches
2010-11-01 19:47   ` Mark Brown
2010-11-01 19:47     ` Mark Brown

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=1288489139.366.169.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mcree@orcon.net.nz \
    --cc=rth@twiddle.net \
    --cc=trivial@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.