mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-07 03:50:59 +00:00
[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>
This commit is contained in:
parent
71e834f563
commit
4ba946e9d8
@ -73,7 +73,6 @@ static int fgb(u32 bitmap);
|
|||||||
static int ata_choose_xfer_mode(const struct ata_port *ap,
|
static int ata_choose_xfer_mode(const struct ata_port *ap,
|
||||||
u8 *xfer_mode_out,
|
u8 *xfer_mode_out,
|
||||||
unsigned int *xfer_shift_out);
|
unsigned int *xfer_shift_out);
|
||||||
static void __ata_qc_complete(struct ata_queued_cmd *qc);
|
|
||||||
|
|
||||||
static unsigned int ata_unique_id = 1;
|
static unsigned int ata_unique_id = 1;
|
||||||
static struct workqueue_struct *ata_wq;
|
static struct workqueue_struct *ata_wq;
|
||||||
@ -3593,21 +3592,6 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
|
|||||||
return qc;
|
return qc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __ata_qc_complete(struct ata_queued_cmd *qc)
|
|
||||||
{
|
|
||||||
struct ata_port *ap = qc->ap;
|
|
||||||
unsigned int tag;
|
|
||||||
|
|
||||||
qc->flags = 0;
|
|
||||||
tag = qc->tag;
|
|
||||||
if (likely(ata_tag_valid(tag))) {
|
|
||||||
if (tag == ap->active_tag)
|
|
||||||
ap->active_tag = ATA_TAG_POISON;
|
|
||||||
qc->tag = ATA_TAG_POISON;
|
|
||||||
clear_bit(tag, &ap->qactive);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ata_qc_free - free unused ata_queued_cmd
|
* ata_qc_free - free unused ata_queued_cmd
|
||||||
* @qc: Command to complete
|
* @qc: Command to complete
|
||||||
@ -3620,9 +3604,19 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc)
|
|||||||
*/
|
*/
|
||||||
void ata_qc_free(struct ata_queued_cmd *qc)
|
void ata_qc_free(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
|
struct ata_port *ap = qc->ap;
|
||||||
|
unsigned int tag;
|
||||||
|
|
||||||
assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */
|
assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */
|
||||||
|
|
||||||
__ata_qc_complete(qc);
|
qc->flags = 0;
|
||||||
|
tag = qc->tag;
|
||||||
|
if (likely(ata_tag_valid(tag))) {
|
||||||
|
if (tag == ap->active_tag)
|
||||||
|
ap->active_tag = ATA_TAG_POISON;
|
||||||
|
qc->tag = ATA_TAG_POISON;
|
||||||
|
clear_bit(tag, &ap->qactive);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3662,7 +3656,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
|
|||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
__ata_qc_complete(qc);
|
ata_qc_free(qc);
|
||||||
|
|
||||||
VPRINTK("EXIT\n");
|
VPRINTK("EXIT\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user