提交 caa8c508 编写于 作者: B Bruce Allan 提交者: Herbert Xu

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: NBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: NTadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 0c5f0aa5
...@@ -182,12 +182,7 @@ int adf_devmgr_verify_id(uint32_t id) ...@@ -182,12 +182,7 @@ int adf_devmgr_verify_id(uint32_t id)
void adf_devmgr_get_num_dev(uint32_t *num) void adf_devmgr_get_num_dev(uint32_t *num)
{ {
struct list_head *itr; *num = num_devices;
*num = 0;
list_for_each(itr, &accel_table) {
(*num)++;
}
} }
int adf_dev_in_use(struct adf_accel_dev *accel_dev) int adf_dev_in_use(struct adf_accel_dev *accel_dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册