All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben@splentec.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Patrick Mansfield <patmans@us.ibm.com>, linux-scsi@vger.kernel.org
Subject: Re: [RFC][PATCH] scsi-misc-2.5 software enqueue when can_queue reached
Date: Mon, 03 Mar 2003 13:17:02 -0500	[thread overview]
Message-ID: <3E639C1E.7060000@splentec.com> (raw)
In-Reply-To: 20030302085728.A11407@infradead.org

Christoph Hellwig wrote:
[cut]
>>+{
>>+	struct scsi_cmnd *scmd;
>>+	unsigned long flags;
>>+
>>+	spin_lock_irqsave(shost->host_lock, flags);
>>+	while (!shost->host_self_blocked
>>+	       && !list_empty(&shost->pending_queue)) {
> 
> 
> Linux codingstyle sais the && should be before the line break.

Actually there's a point to this.

Vision research has shown that the human eye doesn't scan/parse
more than 5% to 15% of the beginning of text lines when
searching for an item.

When a binary logical operator is on the continued (second)
line of the if test, the brain automatically assumes that
this is a _continuation_ of the logical condition -- since
no valid C language line starts _with_ a _binary logical op_.

But if the binary logical op were on the previous line, then
the next line would look just like a normal line and one would
_have_ to look at the previous line to see if it ends with `}' or
`;'.

There's a book called "C Style: Standards and Guidelines" by
David Straker, (C) 1992, Prentice Hall, ISBN: 0-13-116898-3.
More information can be found therein.

-- 
Luben



  parent reply	other threads:[~2003-03-03 18:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28 19:19 [RFC][PATCH] scsi-misc-2.5 software enqueue when can_queue reached Patrick Mansfield
2003-03-02  8:57 ` Christoph Hellwig
2003-03-02 18:15   ` Patrick Mansfield
2003-03-03 15:52   ` Randy.Dunlap
2003-03-03 18:17   ` Luben Tuikov [this message]
2003-03-04  1:11     ` Andrew Morton
2003-03-04  4:49       ` Luben Tuikov
2003-03-02 20:57 ` Luben Tuikov
2003-03-02 21:08   ` Luben Tuikov
2003-03-03 20:52   ` Patrick Mansfield
2003-03-03 22:40     ` Luben Tuikov
2003-03-03 23:41       ` Patrick Mansfield
2003-03-04  5:48         ` Luben Tuikov
2003-03-05  3:02 ` James Bottomley
2003-03-05 18:43   ` Patrick Mansfield
2003-03-06 15:57     ` James Bottomley
2003-03-06 17:41       ` Patrick Mansfield
2003-03-06 18:04         ` James Bottomley

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=3E639C1E.7060000@splentec.com \
    --to=luben@splentec.com \
    --cc=hch@infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    /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.