scsi: cxlflash: Improve asynchronous interrupt processing
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Wed, 12 Apr 2017 19:15:29 +0000 (14:15 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 14 Apr 2017 02:55:41 +0000 (22:55 -0400)
commite2ef33fa5958c51ebf0c6f18db19fe927e2185fa
tree3d70be5e18ab9f6574b2e72f0e1c7384a2a2ba43
parentfcc87e74a987dc9c0c85f53546df944ede76486a
scsi: cxlflash: Improve asynchronous interrupt processing

The method used to decode asynchronous interrupts involves unnecessary loops
to match up bits that are set with corresponding entries in the asynchronous
interrupt information table. This algorithm is wasteful and does not scale
well as new status bits are supported.

As an improvement, use the for_each_set_bit() service to iterate over the
asynchronous status bits and refactor the information table such that it can
be indexed by bit position.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/main.c