From 994a9303d33f8238d57f58c26067b6d4ac9af222 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 9 Jun 2011 16:04:28 -0700 Subject: isci: cleanup/optimize queue increment macros Every single i/o or event completion incurs a test and branch to see if the cycle bit changed. For power-of-2 queue sizes the cycle bit can be read directly from the rollover of the queue pointer. Likely premature optimization, but the hidden if() and hidden assignments / side-effects in the macros were already asking to be cleaned up. Signed-off-by: Dan Williams --- drivers/scsi/isci/host.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'drivers/scsi/isci/host.h') diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h index 7d17ab80f1a..94fd54dc9f0 100644 --- a/drivers/scsi/isci/host.h +++ b/drivers/scsi/isci/host.h @@ -523,22 +523,6 @@ static inline struct isci_host *scic_to_ihost(struct scic_sds_controller *scic) return ihost; } -/** - * INCREMENT_QUEUE_GET() - - * - * This macro will increment the specified index to and if the index wraps to 0 - * it will toggel the cycle bit. - */ -#define INCREMENT_QUEUE_GET(index, cycle, entry_count, bit_toggle) \ - { \ - if ((index) + 1 == entry_count) { \ - (index) = 0; \ - (cycle) = (cycle) ^ (bit_toggle); \ - } else { \ - index = index + 1; \ - } \ - } - /** * scic_sds_controller_get_protocol_engine_group() - * -- cgit v1.2.3-70-g09d2