From: Patrick Mansfield <patmans@us.ibm.com>
To: Mike Anderson <andmike@us.ibm.com>
Cc: linux-scsi@vger.kernel.org, mdharm-scsi@one-eyed-alien.net
Subject: Re: [PATCH / RFC] scsi_set_host_offline
Date: Mon, 3 Mar 2003 16:08:31 -0800 [thread overview]
Message-ID: <20030303160831.A32018@beaverton.ibm.com> (raw)
In-Reply-To: <20030303221532.GB1587@beaverton.ibm.com>; from andmike@us.ibm.com on Mon, Mar 03, 2003 at 02:15:32PM -0800
Looks nice. Two nits.
On Mon, Mar 03, 2003 at 02:15:32PM -0800, Mike Anderson wrote:
> + spin_lock_irqsave(shost->host_lock, flags);
> + for (lh = shost->my_devices.next; lh != &shost->my_devices;){
Uh oh you are missing a space above, better call the code style police :)
> + sdev = list_entry(lh, struct scsi_device, siblings);
> + scsi_device_get(sdev);
> + spin_unlock_irqrestore(shost->host_lock, flags);
> + error = fn(sdev, data);
> + spin_lock_irqsave(shost->host_lock, flags);
> + lh = lh->next;
> + scsi_device_put(sdev);
> + if (error)
> + break;
Embedding "!error &&" in the for conditional is a bit cleaner.
-- Patrick Mansfield
next prev parent reply other threads:[~2003-03-04 0:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-03 22:15 [PATCH / RFC] scsi_set_host_offline Mike Anderson
2003-03-04 0:03 ` Oliver Neukum
2003-03-04 20:36 ` Matthew Dharm
2003-03-04 20:57 ` Oliver Neukum
2003-03-04 22:29 ` Mike Anderson
2003-03-04 23:12 ` Oliver Neukum
2003-03-05 16:52 ` James Bottomley
2003-03-05 19:49 ` Oliver Neukum
2003-03-05 22:35 ` Mike Anderson
2003-03-06 14:33 ` Oliver Neukum
2003-03-04 0:08 ` Patrick Mansfield [this message]
2003-03-22 21:24 ` Matthew Dharm
2003-03-25 9:46 ` Mike Anderson
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=20030303160831.A32018@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=andmike@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mdharm-scsi@one-eyed-alien.net \
/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