From: Tejun Heo <htejun@gmail.com>
To: James.Bottomley@steeleye.com, axboe@suse.de
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions
Date: Wed, 23 Mar 2005 11:14:39 +0900 (KST) [thread overview]
Message-ID: <20050323021335.2655518E@htj.dyndns.org> (raw)
In-Reply-To: <20050323021335.960F95F8@htj.dyndns.org>
04_scsi_remove_volatile.patch
scsi_device->device_busy, Scsi_Host->host_busy and
->host_failed have volatile qualifiers, but the qualifiers
don't serve any purpose. Kill them. While at it, protect
->host_failed update in scsi_error for consistency and clarity.
Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/scsi/scsi_error.c | 6 +++++-
include/scsi/scsi_device.h | 2 +-
include/scsi/scsi_host.h | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
Index: scsi-export/drivers/scsi/scsi_error.c
===================================================================
--- scsi-export.orig/drivers/scsi/scsi_error.c 2005-03-23 09:40:09.000000000 +0900
+++ scsi-export/drivers/scsi/scsi_error.c 2005-03-23 09:40:10.000000000 +0900
@@ -652,9 +652,13 @@ static int scsi_request_sense(struct scs
static void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
struct list_head *done_q)
{
+ unsigned long flags;
+
+ spin_lock_irqsave(scmd->device->host->host_lock, flags);
scmd->device->host->host_failed--;
- scmd->state = SCSI_STATE_BHQUEUE;
+ spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
+ scmd->state = SCSI_STATE_BHQUEUE;
scsi_eh_eflags_clr_all(scmd);
/*
Index: scsi-export/include/scsi/scsi_device.h
===================================================================
--- scsi-export.orig/include/scsi/scsi_device.h 2005-03-23 09:39:36.000000000 +0900
+++ scsi-export/include/scsi/scsi_device.h 2005-03-23 09:40:10.000000000 +0900
@@ -43,7 +43,7 @@ struct scsi_device {
struct list_head siblings; /* list of all devices on this host */
struct list_head same_target_siblings; /* just the devices sharing same target id */
- volatile unsigned short device_busy; /* commands actually active on low-level */
+ unsigned short device_busy; /* commands actually active on low-level */
spinlock_t sdev_lock; /* also the request queue_lock */
spinlock_t list_lock;
struct list_head cmd_list; /* queue of in use SCSI Command structures */
Index: scsi-export/include/scsi/scsi_host.h
===================================================================
--- scsi-export.orig/include/scsi/scsi_host.h 2005-03-23 09:39:36.000000000 +0900
+++ scsi-export/include/scsi/scsi_host.h 2005-03-23 09:40:10.000000000 +0900
@@ -448,8 +448,8 @@ struct Scsi_Host {
wait_queue_head_t host_wait;
struct scsi_host_template *hostt;
struct scsi_transport_template *transportt;
- volatile unsigned short host_busy; /* commands actually active on low-level */
- volatile unsigned short host_failed; /* commands that failed. */
+ unsigned short host_busy; /* commands actually active on low-level */
+ unsigned short host_failed; /* commands that failed. */
unsigned short host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al. */
int resetting; /* if set, it means that last_reset is a valid value */
next prev parent reply other threads:[~2005-03-23 2:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-23 2:14 [PATCH scsi-misc-2.6 00/08] scsi: small fixes & cleanups Tejun Heo
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 01/08] scsi: remove unused bounce-buffer release path Tejun Heo
2005-03-23 4:07 ` James Bottomley
2005-03-23 6:08 ` Tejun Heo
2005-03-23 15:27 ` Jens Axboe
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 02/08] scsi: don't use blk_insert_request() for requeueing Tejun Heo
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 03/08] scsi: remove unused scsi_cmnd->internal_timeout field Tejun Heo
2005-03-23 2:14 ` Tejun Heo [this message]
2005-03-23 4:15 ` [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions James Bottomley
2005-03-23 4:22 ` Jeff Garzik
2005-03-23 5:28 ` Tejun Heo
2005-03-23 15:16 ` James Bottomley
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 05/08] scsi: remove a timer race from scsi_queue_insert() and cleanup timer Tejun Heo
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 06/08] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field Tejun Heo
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 07/08] scsi: remove bogus {get|put}_device() calls Tejun Heo
2005-03-23 4:15 ` James Bottomley
2005-03-23 9:13 ` Tejun Heo
2005-03-29 17:02 ` Patrick Mansfield
2005-03-23 2:14 ` [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence Tejun Heo
2005-03-23 4:08 ` James Bottomley
2005-03-23 4:50 ` Tejun Heo
2005-03-23 7:19 ` Jens Axboe
2005-03-23 15:20 ` James Bottomley
2005-03-23 15:25 ` Jens Axboe
2005-03-25 0:45 ` James Bottomley
2005-03-25 3:15 ` Tejun Heo
2005-03-25 5:02 ` James Bottomley
2005-03-25 5:38 ` Tejun Heo
2005-03-25 19:19 ` James Bottomley
2005-03-25 21:43 ` Tejun Heo
2005-03-25 22:49 ` James Bottomley
2005-03-26 7:27 ` Kai Makisara
2005-03-26 14:48 ` James Bottomley
2005-03-23 15:12 ` 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=20050323021335.2655518E@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.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 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®