summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorAdam Guerin <adam.guerin@intel.com>2023-06-09 19:38:19 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-06-16 15:30:35 +0300
commit038ccc2876686a508d9d46d23ad540a5ad6a969f (patch)
treead956e17e17f2443e1c96c38a306a99fcf9a8fcc /drivers/crypto
parentf75bd28beb4a804a42a01e26f162f8c42b65fb09 (diff)
downloadlinux-038ccc2876686a508d9d46d23ad540a5ad6a969f.tar.xz
crypto: qat - move returns to default case
Make use of the default statements by changing the pattern: switch(condition) { case COND_A: ... break; case COND_b: ... break; } return ret; in switch(condition) { case COND_A: ... break; case COND_b: ... break; default: return ret; } Signed-off-by: Adam Guerin <adam.guerin@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c20
-rw-r--r--drivers/crypto/intel/qat/qat_common/qat_algs.c1
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
index 7324b86a4f40..93ccbc6b1070 100644
--- a/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
+++ b/drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
@@ -214,9 +214,9 @@ static u32 get_accel_cap(struct adf_accel_dev *accel_dev)
return capabilities_cy;
case SVC_DC:
return capabilities_dc;
+ default:
+ return 0;
}
-
- return 0;
}
static enum dev_sku_info get_sku(struct adf_hw_device_data *self)
@@ -231,9 +231,9 @@ static const u32 *adf_get_arbiter_mapping(struct adf_accel_dev *accel_dev)
return thrd_to_arb_map_cy;
case SVC_DC:
return thrd_to_arb_map_dc;
+ default:
+ return NULL;
}
-
- return NULL;
}
static void get_arb_info(struct arb_info *arb_info)
@@ -318,9 +318,9 @@ static char *uof_get_name_4xxx(struct adf_accel_dev *accel_dev, u32 obj_num)
return adf_4xxx_fw_cy_config[obj_num].obj_name;
case SVC_DC:
return adf_4xxx_fw_dc_config[obj_num].obj_name;
+ default:
+ return NULL;
}
-
- return NULL;
}
static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
@@ -330,9 +330,9 @@ static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num)
return adf_402xx_fw_cy_config[obj_num].obj_name;
case SVC_DC:
return adf_402xx_fw_dc_config[obj_num].obj_name;
+ default:
+ return NULL;
}
-
- return NULL;
}
static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
@@ -342,9 +342,9 @@ static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num)
return adf_4xxx_fw_cy_config[obj_num].ae_mask;
case SVC_DC:
return adf_4xxx_fw_dc_config[obj_num].ae_mask;
+ default:
+ return 0;
}
-
- return 0;
}
void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
diff --git a/drivers/crypto/intel/qat/qat_common/qat_algs.c b/drivers/crypto/intel/qat/qat_common/qat_algs.c
index 538dcbfbcd26..3c4bba4a8779 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_algs.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_algs.c
@@ -106,7 +106,6 @@ static int qat_get_inter_state_size(enum icp_qat_hw_auth_algo qat_hash_alg)
default:
return -EFAULT;
}
- return -EFAULT;
}
static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,