mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jean Delvare <khali@linux-fr.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Brownell <david-b@pacbell.net>
Subject: Re: [PATCH] CodingStyle: Printing numbers in parentheses is fine
Date: Sat, 29 Sep 2007 22:18:56 -0400	[thread overview]
Message-ID: <17982.1191118736@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Sat, 29 Sep 2007 03:51:56 PDT." <20070929035156.cd6fe860.akpm@linux-foundation.org>

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

On Sat, 29 Sep 2007 03:51:56 PDT, Andrew Morton said:

> Printing something like
> 
> 	bytes remaining: 0x12 (18)
> 
> is a quite logical thing to do, although pretty darm pointless.

On the other hand, printing this:

        magic number: 0x2710

probably doesn't ring any bells, but if you changed that format to be

	"magic number: %x (%d)",foo,foo

you'll almost certainly sit up and ask "Where the fsck did *that* come from?"

(unless you're a *lot* better at doing hex conversions in your head than I).

Yeah, *usually* pointless, but it has its place sometimes....


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

  parent reply	other threads:[~2007-09-30  2:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29 10:25 Jean Delvare
2007-09-29 10:51 ` Andrew Morton
2007-09-29 17:19   ` David Brownell
2007-09-29 18:29   ` Randy Dunlap
2007-09-29 18:53     ` David Brownell
2007-09-29 20:13       ` Randy Dunlap
2007-09-29 22:30         ` David Brownell
2007-09-29 22:51           ` Randy Dunlap
2007-09-29 22:55           ` Måns Rullgård
2007-09-30 10:28           ` Jean Delvare
2007-09-30  2:18   ` Valdis.Kletnieks [this message]
2007-09-30 10:11   ` Jean Delvare

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=17982.1191118736@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®