Skip to content

Commit

Permalink
crypto: qat - remove unnecessary list iteration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bruce Allan authored and Herbert Xu committed Jul 28, 2015
1 parent 0c5f0aa commit caa8c50
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/crypto/qat/qat_common/adf_dev_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit caa8c50

Please sign in to comment.