From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 3/5] libata: cosmetic changes to sense generation functions
Date: Tue, 14 Nov 2006 22:37:35 +0900 [thread overview]
Message-ID: <11635114552321-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11635114553453-git-send-email-htejun@gmail.com>
* s/ata_gen_ata_desc_sense/ata_gen_passthru_sense/
* s/ata_gen_fixed_sense/ata_gen_ata_sense/
* make both functions static
* neither function has locking requirement, change it to None.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/libata-scsi.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 8c9fa9e..2004a76 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -671,7 +671,7 @@ void ata_to_sense_error(unsigned id, u8
}
/*
- * ata_gen_ata_desc_sense - Generate check condition sense block.
+ * ata_gen_passthru_sense - Generate check condition sense block.
* @qc: Command that completed.
*
* This function is specific to the ATA descriptor format sense
@@ -681,9 +681,9 @@ void ata_to_sense_error(unsigned id, u8
* block. Clear sense key, ASC & ASCQ if there is no error.
*
* LOCKING:
- * spin_lock_irqsave(host lock)
+ * None.
*/
-void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc)
+static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_taskfile *tf = &qc->result_tf;
@@ -743,16 +743,16 @@ void ata_gen_ata_desc_sense(struct ata_q
}
/**
- * ata_gen_fixed_sense - generate a SCSI fixed sense block
+ * ata_gen_ata_sense - generate a SCSI fixed sense block
* @qc: Command that we are erroring out
*
* Leverage ata_to_sense_error() to give us the codes. Fit our
* LBA in here if there's room.
*
* LOCKING:
- * inherited from caller
+ * None.
*/
-void ata_gen_fixed_sense(struct ata_queued_cmd *qc)
+static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_taskfile *tf = &qc->result_tf;
@@ -1459,7 +1459,7 @@ static void ata_scsi_qc_complete(struct
*/
if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) &&
((cdb[2] & 0x20) || need_sense)) {
- ata_gen_ata_desc_sense(qc);
+ ata_gen_passthru_sense(qc);
} else {
if (!need_sense) {
cmd->result = SAM_STAT_GOOD;
@@ -1470,7 +1470,7 @@ static void ata_scsi_qc_complete(struct
* good for smaller LBA (and maybe CHS?)
* devices.
*/
- ata_gen_fixed_sense(qc);
+ ata_gen_ata_sense(qc);
}
}
@@ -2301,7 +2301,7 @@ static void atapi_sense_complete(struct
* a sense descriptors, since that's only
* correct for ATA, not ATAPI
*/
- ata_gen_ata_desc_sense(qc);
+ ata_gen_passthru_sense(qc);
}
qc->scsidone(qc->scsicmd);
@@ -2376,7 +2376,7 @@ static void atapi_qc_complete(struct ata
* sense descriptors, since that's only
* correct for ATA, not ATAPI
*/
- ata_gen_ata_desc_sense(qc);
+ ata_gen_passthru_sense(qc);
}
/* SCSI EH automatically locks door if sdev->locked is
@@ -2409,7 +2409,7 @@ static void atapi_qc_complete(struct ata
* a sense descriptors, since that's only
* correct for ATA, not ATAPI
*/
- ata_gen_ata_desc_sense(qc);
+ ata_gen_passthru_sense(qc);
} else {
u8 *scsicmd = cmd->cmnd;
--
1.4.3.3
next prev parent reply other threads:[~2006-11-14 13:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-14 13:37 [PATCHSET] libata: improve sense data generation Tejun Heo
2006-11-14 13:37 ` Tejun Heo [this message]
2006-11-14 13:37 ` [PATCH 4/5] libata: implement ata_tf_read_block() Tejun Heo
2006-11-14 13:37 ` [PATCH 2/5] libata: fix passthru sense data header Tejun Heo
2006-11-14 13:37 ` [PATCH 5/5] libata: improve SCSI sense data generation Tejun Heo
2006-11-14 13:37 ` [PATCH 1/5] libata: sync result_tf.flags w/ command tf.flags Tejun Heo
2006-11-14 19:33 ` Jeff Garzik
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=11635114552321-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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 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.