mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Scott Preece" <sepreece@gmail.com>
To: "Erez Zadok" <ezk@cs.sunysb.edu>
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, "Kok,
	Auke" <auke-jan.h.kok@intel.com>,
	"Kyle Moffett" <mrmacman_g4@mac.com>,
	"Jan Engelhardt" <jengelh@computergmbh.de>,
	"Adrian Bunk" <bunk@kernel.org>, roel <12o3l@tiscali.nl>
Subject: Re: [PATCH 1/3] CodingStyle updates
Date: Sat, 29 Sep 2007 10:59:57 -0500	[thread overview]
Message-ID: <7b69d1470709290859s4dfcb6x8827dd20a4e55b34@mail.gmail.com> (raw)
In-Reply-To: <11910151223447-git-send-email-ezk@cs.sunysb.edu>

A couple of comments interspersed...

On 9/28/07, Erez Zadok <ezk@cs.sunysb.edu> wrote:
...
>  There are a number of driver model diagnostic macros in <linux/device.h>
>  which you should use to make sure messages are matched to the right device
---

I think this "which" is non-restrictive, so it should have a comma
after it (I realize that's not part of your patch). It's also possible
to read it as restrictive, in which case "that" would be preferable.

---
>  and driver, and are tagged with the right level:  dev_err(), dev_warn(),
> -dev_info(), and so forth.  For messages that aren't associated with a
> -particular device, <linux/kernel.h> defines pr_debug() and pr_info().
> +dev_info(), and so forth.
> +
> +A number of people often like to define their own debugging printf's,
---

"A number of people often like to..." is awkward. How about
"Developers sometimes..." or "Too many people..."

---
> +wrapping printk's in #ifdef's that get turned on only when subsystem

> +               Chapter 19: branch prediction optimizations
> +
> +The kernel includes macros called likely() and unlikely(), which can be used
---

You might say "The kernel provides the macros likely()..."

---
> +as hints to the compiler to optimize branch prediction.  They operate by
...
> +A good example of this is the above kmalloc(GFP_KERNEL) call.  The chances
> +of kmalloc() returning NULL are rather small, because even if it doesn't
> +have memory to return to you at the moment, with GFP_KERNEL/__GFP_WAIT
> +passed, kmalloc() will wait and suspend your thread, while it goes off to
---

The commas after "passed" and "thread" is unnecessary.

---
> +find some free memory (purging caches, flushing buffers, etc.).  In other
> +words, kmalloc() tries very hard to give you the memory you asked for by the
> +time it return.
---

"...by the time it return." should be "...by the time it returns."

---
> +
> +Consider the next, bad example.  Suppose you're developing a file system
> +which performs logically different actions on different types of entities:
---

This "which" is restrictive; it would be preferable to use "that" instead.

---
> +files, directories, symlinks, devices, etc. and you use this code:
> +
...
> +be penalized heavily for going [sic] down the wrong path...  Therefore, you
> +should consider also whether a seemingly-rare condition is indeed rare ALL
---

The hyphen isn't necessary when the first word of the compount
adjective is an adverb ending in "-ly", so, just "seemingly rare"; or
switch to "apparently rare".

---
> +the time.
...


-- 
scott preece

  parent reply	other threads:[~2007-09-29 16:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28 21:31 [PATCH] 0/3 coding standards documentation/code updates Erez Zadok
2007-09-28 21:32 ` [PATCH 1/3] CodingStyle updates Erez Zadok
2007-09-28 21:46   ` Randy Dunlap
2007-09-29 14:43   ` Shawn Bohrer
2007-09-29 15:59   ` Scott Preece [this message]
2007-09-29 18:01   ` Randy Dunlap
2007-09-29 18:29     ` Sam Ravnborg
2007-09-29 20:21       ` [OT] kbuild syntax extension for ccflags and asflags (was: [PATCH 1/3] CodingStyle updates) Ingo Oeser
2007-09-29 20:24         ` Sam Ravnborg
2007-09-28 21:32 ` [PATCH 2/3] Update usage string for checkpatch.pl Erez Zadok
2007-09-28 21:32 ` [PATCH 3/3] New script to check coding-style compliance on multiple regular files Erez Zadok
2007-09-29 10:10   ` Sam Ravnborg
2007-09-29 18:18 ` [PATCH] 0/3 coding standards documentation/code updates Linus Torvalds
2007-09-29 19:56   ` J. Bruce Fields
2007-09-29 20:14     ` Randy Dunlap
2007-09-30  2:06     ` Theodore Tso
2007-09-30  3:28       ` Erez Zadok
2007-09-29 21:56   ` Robert P. J. Day
2007-09-30  0:23   ` Erez Zadok
2007-09-30  0:49     ` Linus Torvalds
2007-09-30  4:01       ` Erez Zadok
2007-09-30 17:40         ` Mark Lord
2007-09-30 17:59           ` Randy Dunlap
2007-09-30  2:24   ` Valdis.Kletnieks
2007-09-30  3:00     ` Linus Torvalds
2007-09-30  3:29       ` Valdis.Kletnieks
2007-09-30  3:35         ` Linus Torvalds
2007-09-30 17:57         ` Theodore Tso
2007-09-30  3:27     ` Al Viro
2007-09-30  3:39       ` Valdis.Kletnieks

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=7b69d1470709290859s4dfcb6x8827dd20a4e55b34@mail.gmail.com \
    --to=sepreece@gmail.com \
    --cc=12o3l@tiscali.nl \
    --cc=akpm@linux-foundation.org \
    --cc=auke-jan.h.kok@intel.com \
    --cc=bunk@kernel.org \
    --cc=ezk@cs.sunysb.edu \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --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®