diff options
| author | Ahsan Atta <ahsan.atta@intel.com> | 2026-09-18 13:41:12 +0100 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-09-23 18:38:41 +1000 |
| commit | a76c75cd6f8345b728e20e7bcddf0bac1fa6ba43 (patch) | |
| tree | 3cdc853c54fb81ef9dca9e3fde8a3d8299d4114b /include/uapi/linux | |
| parent | cb3a1364fed9ea7b063e3ae026177a145abb5940 (diff) | |
crypto: qat - avoid redundant config list walks when adding a key
adf_cfg_add_key_value_param() now resolves the target section under
cfg->lock, but still calls adf_cfg_key_val_get(), which re-walks the
section list to find that same section and then walks param_head to
read the current value into a temporary buffer. If the value differs it
calls adf_cfg_keyval_remove(), which walks param_head a third time to
locate the entry that was already found.
Look up the existing entry once with adf_cfg_key_value_find() and act on
that pointer directly: free the new copy if the value is unchanged, or
unlink and free the old entry before adding the new one. This drops two
redundant list walks and the on-stack temp_val copy, and removes the now
unused adf_cfg_keyval_remove() helper. No functional change.
Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
