Skip to content

Commit caa8c50

Browse files
bwallanherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Tadeusz Struk <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 0c5f0aa commit caa8c50

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/crypto/qat/qat_common/adf_dev_mgr.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,7 @@ int adf_devmgr_verify_id(uint32_t id)
182182

183183
void adf_devmgr_get_num_dev(uint32_t *num)
184184
{
185-
struct list_head *itr;
186-
187-
*num = 0;
188-
list_for_each(itr, &accel_table) {
189-
(*num)++;
190-
}
185+
*num = num_devices;
191186
}
192187

193188
int adf_dev_in_use(struct adf_accel_dev *accel_dev)

0 commit comments

Comments
 (0)