Skip to contentSkip to conversation

crypto: qat - remove dead ADF_HEX code

PATCH In review Ahsan Atta 3 participants 3 messages Jul 31 – Aug 18

Subsystems (2)
lore
Share & tools
lore

Ahsan Atta

author
#0 lore raw

PATCH 1/1 crypto: qat - remove dead ADF_HEX code

The ADF_HEX value type is defined in the adf_cfg_val_type enum and handled in adf_cfg_add_key_value_param(), but no caller in the tree uses it.

Remove the unused ADF_HEX enum value and its dead handling code.

Fixes d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework")
---
 drivers/crypto/intel/qat/qat_common/adf_cfg.c        | 3 ---
 drivers/crypto/intel/qat/qat_common/adf_cfg_common.h | 1 -
 2 files changed, 4 deletions(-)
drivers/crypto/intel/qat/qat_common/adf_cfg.c +0 -3
index d97ee1000045..b88febf53a19 100644
@@ -292,9 +292,6 @@ int adf_cfg_add_key_value_param(struct adf_accel_dev *accel_dev,
 			 "%ld", (*((long *)val)));
 	} else if (type == ADF_STR) {
 		strscpy(key_val->val, (char *)val);
-	} else if (type == ADF_HEX) {
-		snprintf(key_val->val, ADF_CFG_MAX_VAL_LEN_IN_BYTES,
-			 "0x%lx", (unsigned long)val);
 	} else {
 		dev_err(&GET_DEV(accel_dev), "Unknown type given.\n");
 		kfree(key_val);
drivers/crypto/intel/qat/qat_common/adf_cfg_common.h +0 -1
index d63f4dcccbb5..5922d018f5b9 100644
@@ -28,7 +28,6 @@ enum adf_cfg_service_type {
 
 enum adf_cfg_val_type {
 	ADF_DEC,
-	ADF_HEX,
 	ADF_STR
 };
 
Signature · 13 lines
2.50.1

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
maintainer
#1 lore raw
Quoted 6 lines · Ahsan Atta

The ADF_HEX value type is defined in the adf_cfg_val_type enum and handled in adf_cfg_add_key_value_param(), but no caller in the tree uses it.

Remove the unused ADF_HEX enum value and its dead handling code.

Quoted 8 lines
Fixes d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework")
---
 drivers/crypto/intel/qat/qat_common/adf_cfg.c        | 3 ---
 drivers/crypto/intel/qat/qat_common/adf_cfg_common.h | 1 -
 2 files changed, 4 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw
In reply to Ahsan Atta
Quoted 7 lines · Ahsan Atta

The ADF_HEX value type is defined in the adf_cfg_val_type enum and handled in adf_cfg_add_key_value_param(), but no caller in the tree uses it.

Remove the unused ADF_HEX enum value and its dead handling code.

Fixes d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework")

Why is this a fix? Is there any security threat?

Signature · 2 lines
With Best Regards,
Andy Shevchenko