diff options
author | Tadeusz Struk <tadeusz.struk@intel.com> | 2014-07-25 18:55:32 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-01 10:36:04 -0400 |
commit | df0088f50712f9540769c542d0b4d27acc4fc527 (patch) | |
tree | 6e5c6138ebb96c119fe05be4ca8b8bfa4d650a54 /drivers/crypto | |
parent | 45cff2608007ab28047cadb33e85b58c40b447ce (diff) |
crypto: qat - use min_t macro
prefer min_t() macro over two open-coded logical tests
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')
-rw-r--r-- | drivers/crypto/qat/qat_common/qat_uclo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_uclo.c b/drivers/crypto/qat/qat_common/qat_uclo.c index 17a9954f831e..b1a16eb5a36d 100644 --- a/drivers/crypto/qat/qat_common/qat_uclo.c +++ b/drivers/crypto/qat/qat_common/qat_uclo.c | |||
@@ -901,8 +901,8 @@ static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) | |||
901 | (unsigned long *)&handle->hal_handle->ae_mask)) | 901 | (unsigned long *)&handle->hal_handle->ae_mask)) |
902 | continue; | 902 | continue; |
903 | ae_data = &obj_handle->ae_data[ae]; | 903 | ae_data = &obj_handle->ae_data[ae]; |
904 | for (s = 0; s < ae_data->slice_num && s < ICP_QAT_UCLO_MAX_CTX; | 904 | for (s = 0; s < min_t(unsigned int, ae_data->slice_num, |
905 | s++) { | 905 | ICP_QAT_UCLO_MAX_CTX); s++) { |
906 | if (!obj_handle->ae_data[ae].ae_slices[s].encap_image) | 906 | if (!obj_handle->ae_data[ae].ae_slices[s].encap_image) |
907 | continue; | 907 | continue; |
908 | uof_image = ae_data->ae_slices[s].encap_image->img_ptr; | 908 | uof_image = ae_data->ae_slices[s].encap_image->img_ptr; |