]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hisi_sas: define hisi_sas_device.device_id as int
authorJohn Garry <john.garry@huawei.com>
Wed, 14 Jun 2017 15:33:12 +0000 (23:33 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 20 Jun 2017 01:31:25 +0000 (21:31 -0400)
commit202872516a2bbd397c340223993f87678dd433f8
tree66d6f2769e8ff58fde2b98af67fd12d06df5ca8b
parentdd270fbd7f05f0031ebeba973b64f9103803ed35
scsi: hisi_sas: define hisi_sas_device.device_id as int

Currently hisi_sas_device.device_id is a u64. This can create a problem
in selecting the queue for a device, in that this code does a 64b
division on device id. For some 32b systems, 64b division is slow and
the lib reference must be explicitly included.

The device id does not need to be 64b in size, so, as a solution, just
make as an int.

Also, struct hisi_sas_device elements are re-ordered to improve packing
efficiency.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c