crypto: qat - refactor fw config related functions
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Fri, 20 Oct 2023 13:49:21 +0000 (15:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:23 +0000 (11:59 +0100)
commita7be12fbac05b22d6778cccd0da6656bfc364fe5
treeb8a32b68c96ac3de31fb5ed76ec1215b858dfce3
parent2e513f6bc735d9e5e9eeef60fe4d8bffc000063a
crypto: qat - refactor fw config related functions

[ Upstream commit 2990d2edac6061c6f0f646a46e40957244be2268 ]

The logic that selects the correct adf_fw_config structure based on the
configured service is replicated twice in the uof_get_name() and
uof_get_ae_mask() functions. Refactor the code so that there is no
replication.

This does not introduce any functional change.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Damian Muszynski <damian.muszynski@intel.com>
Reviewed-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Stable-dep-of: a238487f7965 ("crypto: qat - fix ring to service map for QAT GEN4")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c