summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/qat
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2015-07-27 12:58:32 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2015-07-28 15:03:35 +0800
commitcaa8c508494c5de3ea70b44804abfd003f6b0107 (patch)
tree1f62cf506c3709a0d3e4848cdb3873e1be7ddd01 /drivers/crypto/qat
parent0c5f0aa5dd92a36a2c6491695abcb95196b88ef6 (diff)
downloadtalos-obmc-linux-caa8c508494c5de3ea70b44804abfd003f6b0107.tar.gz
talos-obmc-linux-caa8c508494c5de3ea70b44804abfd003f6b0107.zip
crypto: qat - remove unnecessary list iteration
There's no need to iterate through the list for instances in the accel_table since the number of devices is already known in this file. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat')
-rw-r--r--drivers/crypto/qat/qat_common/adf_dev_mgr.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_dev_mgr.c b/drivers/crypto/qat/qat_common/adf_dev_mgr.c
index 4bd38e362884..b574a82368a4 100644
--- a/drivers/crypto/qat/qat_common/adf_dev_mgr.c
+++ b/drivers/crypto/qat/qat_common/adf_dev_mgr.c
@@ -182,12 +182,7 @@ int adf_devmgr_verify_id(uint32_t id)
void adf_devmgr_get_num_dev(uint32_t *num)
{
- struct list_head *itr;
-
- *num = 0;
- list_for_each(itr, &accel_table) {
- (*num)++;
- }
+ *num = num_devices;
}
int adf_dev_in_use(struct adf_accel_dev *accel_dev)
OpenPOWER on IntegriCloud