diff options
| author | Tejun Heo <htejun@gmail.com> | 2006-02-11 01:13:49 -0500 | 
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-11 17:51:56 -0500 | 
| commit | 76014427e60f7ecfdc689dfbcb48e9760e1da4fb (patch) | |
| tree | cf885f718315ed7819fd8f6f4a375540847baf2f | |
| parent | cbefa3258eade263dbc9ae2c1f1ea2ca96e6b457 (diff) | |
[PATCH] libata: inline ata_qc_complete()
This patch inlines ata_qc_complete() and uninlines __ata_qc_complete()
as suggested by Jeff Garzik.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| -rw-r--r-- | drivers/scsi/libata-core.c | 23 | ||||
| -rw-r--r-- | drivers/scsi/libata.h | 1 | ||||
| -rw-r--r-- | include/linux/libata.h | 20 | 
3 files changed, 21 insertions, 23 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 38e72c1dd689..fffbaa9dae76 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c  | |||
| @@ -3621,7 +3621,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) | |||
| 3621 | } | 3621 | } | 
| 3622 | } | 3622 | } | 
| 3623 | 3623 | ||
| 3624 | inline void __ata_qc_complete(struct ata_queued_cmd *qc) | 3624 | void __ata_qc_complete(struct ata_queued_cmd *qc) | 
| 3625 | { | 3625 | { | 
| 3626 | assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */ | 3626 | assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */ | 
| 3627 | assert(qc->flags & ATA_QCFLAG_ACTIVE); | 3627 | assert(qc->flags & ATA_QCFLAG_ACTIVE); | 
| @@ -3639,25 +3639,6 @@ inline void __ata_qc_complete(struct ata_queued_cmd *qc) | |||
| 3639 | qc->complete_fn(qc); | 3639 | qc->complete_fn(qc); | 
| 3640 | } | 3640 | } | 
| 3641 | 3641 | ||
| 3642 | /** | ||
| 3643 | * ata_qc_complete - Complete an active ATA command | ||
| 3644 | * @qc: Command to complete | ||
| 3645 | * @err_mask: ATA Status register contents | ||
| 3646 | * | ||
| 3647 | * Indicate to the mid and upper layers that an ATA | ||
| 3648 | * command has completed, with either an ok or not-ok status. | ||
| 3649 | * | ||
| 3650 | * LOCKING: | ||
| 3651 | * spin_lock_irqsave(host_set lock) | ||
| 3652 | */ | ||
| 3653 | void ata_qc_complete(struct ata_queued_cmd *qc) | ||
| 3654 | { | ||
| 3655 | if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED)) | ||
| 3656 | return; | ||
| 3657 | |||
| 3658 | __ata_qc_complete(qc); | ||
| 3659 | } | ||
| 3660 | |||
| 3661 | static inline int ata_should_dma_map(struct ata_queued_cmd *qc) | 3642 | static inline int ata_should_dma_map(struct ata_queued_cmd *qc) | 
| 3662 | { | 3643 | { | 
| 3663 | struct ata_port *ap = qc->ap; | 3644 | struct ata_port *ap = qc->ap; | 
| @@ -4877,7 +4858,7 @@ EXPORT_SYMBOL_GPL(ata_device_add); | |||
| 4877 | EXPORT_SYMBOL_GPL(ata_host_set_remove); | 4858 | EXPORT_SYMBOL_GPL(ata_host_set_remove); | 
| 4878 | EXPORT_SYMBOL_GPL(ata_sg_init); | 4859 | EXPORT_SYMBOL_GPL(ata_sg_init); | 
| 4879 | EXPORT_SYMBOL_GPL(ata_sg_init_one); | 4860 | EXPORT_SYMBOL_GPL(ata_sg_init_one); | 
| 4880 | EXPORT_SYMBOL_GPL(ata_qc_complete); | 4861 | EXPORT_SYMBOL_GPL(__ata_qc_complete); | 
| 4881 | EXPORT_SYMBOL_GPL(ata_qc_issue_prot); | 4862 | EXPORT_SYMBOL_GPL(ata_qc_issue_prot); | 
| 4882 | EXPORT_SYMBOL_GPL(ata_eng_timeout); | 4863 | EXPORT_SYMBOL_GPL(ata_eng_timeout); | 
| 4883 | EXPORT_SYMBOL_GPL(ata_tf_load); | 4864 | EXPORT_SYMBOL_GPL(ata_tf_load); | 
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 1cd071a32e93..9d76923a2253 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h  | |||
| @@ -46,7 +46,6 @@ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | |||
| 46 | extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); | 46 | extern int ata_rwcmd_protocol(struct ata_queued_cmd *qc); | 
| 47 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 47 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 
| 48 | extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc); | 48 | extern unsigned int ata_qc_issue(struct ata_queued_cmd *qc); | 
| 49 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); | ||
| 50 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); | 49 | extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); | 
| 51 | extern void ata_dev_select(struct ata_port *ap, unsigned int device, | 50 | extern void ata_dev_select(struct ata_port *ap, unsigned int device, | 
| 52 | unsigned int wait, unsigned int can_sleep); | 51 | unsigned int wait, unsigned int can_sleep); | 
diff --git a/include/linux/libata.h b/include/linux/libata.h index c1e198655bb1..695d9ae6ec03 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h  | |||
| @@ -556,7 +556,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc); | |||
| 556 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 556 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 
| 557 | extern u8 ata_bmdma_status(struct ata_port *ap); | 557 | extern u8 ata_bmdma_status(struct ata_port *ap); | 
| 558 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 558 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 
| 559 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 559 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); | 
| 560 | extern void ata_eng_timeout(struct ata_port *ap); | 560 | extern void ata_eng_timeout(struct ata_port *ap); | 
| 561 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, | 561 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, | 
| 562 | struct scsi_cmnd *cmd, | 562 | struct scsi_cmnd *cmd, | 
| @@ -756,6 +756,24 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc) | |||
| 756 | ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); | 756 | ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); | 
| 757 | } | 757 | } | 
| 758 | 758 | ||
| 759 | /** | ||
| 760 | * ata_qc_complete - Complete an active ATA command | ||
| 761 | * @qc: Command to complete | ||
| 762 | * @err_mask: ATA Status register contents | ||
| 763 | * | ||
| 764 | * Indicate to the mid and upper layers that an ATA | ||
| 765 | * command has completed, with either an ok or not-ok status. | ||
| 766 | * | ||
| 767 | * LOCKING: | ||
| 768 | * spin_lock_irqsave(host_set lock) | ||
| 769 | */ | ||
| 770 | static inline void ata_qc_complete(struct ata_queued_cmd *qc) | ||
| 771 | { | ||
| 772 | if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED)) | ||
| 773 | return; | ||
| 774 | |||
| 775 | __ata_qc_complete(qc); | ||
| 776 | } | ||
| 759 | 777 | ||
| 760 | /** | 778 | /** | 
| 761 | * ata_irq_on - Enable interrupts on a port. | 779 | * ata_irq_on - Enable interrupts on a port. | 
