summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.h
diff options
context:
space:
mode:
authorDon Brace <don.brace@pmcs.com>2015-01-23 17:43:51 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:41 -0500
commitbee266a6d572b231643a486bec11fc5ac370d779 (patch)
tree2907719c4b6e97f27fe0b72efe47d896ecd32482 /drivers/scsi/hpsa.h
parent34f0c6277c686b191936cc321faebd15b28f9ece (diff)
hpsa: slightly optimize SA5_performant_completed
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.h')
-rw-r--r--drivers/scsi/hpsa.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index 1856445f883a..aa6cb0b0b427 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -412,19 +412,19 @@ static unsigned long SA5_performant_completed(struct ctlr_info *h, u8 q)
412 unsigned long register_value = FIFO_EMPTY; 412 unsigned long register_value = FIFO_EMPTY;
413 413
414 /* msi auto clears the interrupt pending bit. */ 414 /* msi auto clears the interrupt pending bit. */
415 if (!(h->msi_vector || h->msix_vector)) { 415 if (unlikely(!(h->msi_vector || h->msix_vector))) {
416 /* flush the controller write of the reply queue by reading 416 /* flush the controller write of the reply queue by reading
417 * outbound doorbell status register. 417 * outbound doorbell status register.
418 */ 418 */
419 register_value = readl(h->vaddr + SA5_OUTDB_STATUS); 419 (void) readl(h->vaddr + SA5_OUTDB_STATUS);
420 writel(SA5_OUTDB_CLEAR_PERF_BIT, h->vaddr + SA5_OUTDB_CLEAR); 420 writel(SA5_OUTDB_CLEAR_PERF_BIT, h->vaddr + SA5_OUTDB_CLEAR);
421 /* Do a read in order to flush the write to the controller 421 /* Do a read in order to flush the write to the controller
422 * (as per spec.) 422 * (as per spec.)
423 */ 423 */
424 register_value = readl(h->vaddr + SA5_OUTDB_STATUS); 424 (void) readl(h->vaddr + SA5_OUTDB_STATUS);
425 } 425 }
426 426
427 if ((rq->head[rq->current_entry] & 1) == rq->wraparound) { 427 if ((((u32) rq->head[rq->current_entry]) & 1) == rq->wraparound) {
428 register_value = rq->head[rq->current_entry]; 428 register_value = rq->head[rq->current_entry];
429 rq->current_entry++; 429 rq->current_entry++;
430 atomic_dec(&h->commands_outstanding); 430 atomic_dec(&h->commands_outstanding);