Re: [PATCH 1/2] libata: get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Elias Oltmanns
Date: Wednesday, October 22, 2008 - 11:23 am

Jens Axboe <jens.axboe@oracle.com> wrote:

If you think about it, this statement is equivalent to

	if (ap->qc_active ^ qc_active == (1 << (ATA_MAX_QUEUE - 1)))

To fix this, you could say

	if (++next + i >= ATA_MAX_QUEUE)

but perhaps it would be even more efficient (or not much worse) to skip
this check entirely.

Regards,

Elias
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/2] libata: get rid of ATA_MAX_QUEUE loop in a ..., Elias Oltmanns, (Wed Oct 22, 11:23 am)