diff options
author | Tejun Heo <htejun@gmail.com> | 2006-01-22 23:09:36 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-26 22:33:49 -0500 |
commit | 4ba946e9d8e10fada7bbce527f6ea05842592e06 (patch) | |
tree | 343f9381a51941bb03073075d577c70325067f6d /drivers/scsi | |
parent | 71e834f563799e09c6bd7d6638993b464fac26f5 (diff) |
[PATCH] libata: fold __ata_qc_complete() into ata_qc_free()
All ata_qc_free() does is calling __ata_qc_complete() which isn't used
anywhere else. Fold __ata_qc_complete() into ata_qc_free().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index a07bd35da912..0e4932362949 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -73,7 +73,6 @@ static int fgb(u32 bitmap); | |||
73 | static int ata_choose_xfer_mode(const struct ata_port *ap, | 73 | static int ata_choose_xfer_mode(const struct ata_port *ap, |
74 | u8 *xfer_mode_out, | 74 | u8 *xfer_mode_out, |
75 | unsigned int *xfer_shift_out); | 75 | unsigned int *xfer_shift_out); |
76 | static void __ata_qc_complete(struct ata_queued_cmd *qc); | ||
77 | 76 | ||
78 | static unsigned int ata_unique_id = 1; | 77 | static unsigned int ata_unique_id = 1; |
79 | static struct workqueue_struct *ata_wq; | 78 | static struct workqueue_struct *ata_wq; |
@@ -3593,21 +3592,6 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | |||
3593 | return qc; | 3592 | return qc; |
3594 | } | 3593 | } |
3595 | 3594 | ||
3596 | static void __ata_qc_complete(struct ata_queued_cmd *qc) | ||
3597 | { | ||
3598 | struct ata_port *ap = qc->ap; | ||
3599 | unsigned int tag; | ||
3600 | |||
3601 | qc->flags = 0; | ||
3602 | tag = qc->tag; | ||
3603 | if (likely(ata_tag_valid(tag))) { | ||
3604 | if (tag == ap->active_tag) | ||
3605 | ap->active_tag = ATA_TAG_POISON; | ||
3606 | qc->tag = ATA_TAG_POISON; | ||
3607 | clear_bit(tag, &ap->qactive); | ||
3608 | } | ||
3609 | } | ||
3610 | |||
3611 | /** | 3595 | /** |
3612 | * ata_qc_free - free unused ata_queued_cmd | 3596 | * ata_qc_free - free unused ata_queued_cmd |
3613 | * @qc: Command to complete | 3597 | * @qc: Command to complete |
@@ -3620,9 +3604,19 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc) | |||
3620 | */ | 3604 | */ |
3621 | void ata_qc_free(struct ata_queued_cmd *qc) | 3605 | void ata_qc_free(struct ata_queued_cmd *qc) |
3622 | { | 3606 | { |
3607 | struct ata_port *ap = qc->ap; | ||
3608 | unsigned int tag; | ||
3609 | |||
3623 | assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */ | 3610 | assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */ |
3624 | 3611 | ||
3625 | __ata_qc_complete(qc); | 3612 | qc->flags = 0; |
3613 | tag = qc->tag; | ||
3614 | if (likely(ata_tag_valid(tag))) { | ||
3615 | if (tag == ap->active_tag) | ||
3616 | ap->active_tag = ATA_TAG_POISON; | ||
3617 | qc->tag = ATA_TAG_POISON; | ||
3618 | clear_bit(tag, &ap->qactive); | ||
3619 | } | ||
3626 | } | 3620 | } |
3627 | 3621 | ||
3628 | /** | 3622 | /** |
@@ -3662,7 +3656,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc) | |||
3662 | if (rc != 0) | 3656 | if (rc != 0) |
3663 | return; | 3657 | return; |
3664 | 3658 | ||
3665 | __ata_qc_complete(qc); | 3659 | ata_qc_free(qc); |
3666 | 3660 | ||
3667 | VPRINTK("EXIT\n"); | 3661 | VPRINTK("EXIT\n"); |
3668 | } | 3662 | } |