]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3615b4db90ece46563f11449355fd41d6a37af0c
tree3d70be5e18ab9f6574b2e72f0e1c7384a2a2ba43
parenta6389a53a4e6a75e99c54f8de519aa85c1ccdb87
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