Skip to content

Commit 038ccc2

Browse files
aguerinIntelherbertx
authored andcommitted
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 <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent f75bd28 commit 038ccc2

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ static u32 get_accel_cap(struct adf_accel_dev *accel_dev)
214214
return capabilities_cy;
215215
case SVC_DC:
216216
return capabilities_dc;
217+
default:
218+
return 0;
217219
}
218-
219-
return 0;
220220
}
221221

222222
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)
231231
return thrd_to_arb_map_cy;
232232
case SVC_DC:
233233
return thrd_to_arb_map_dc;
234+
default:
235+
return NULL;
234236
}
235-
236-
return NULL;
237237
}
238238

239239
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)
318318
return adf_4xxx_fw_cy_config[obj_num].obj_name;
319319
case SVC_DC:
320320
return adf_4xxx_fw_dc_config[obj_num].obj_name;
321+
default:
322+
return NULL;
321323
}
322-
323-
return NULL;
324324
}
325325

326326
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)
330330
return adf_402xx_fw_cy_config[obj_num].obj_name;
331331
case SVC_DC:
332332
return adf_402xx_fw_dc_config[obj_num].obj_name;
333+
default:
334+
return NULL;
333335
}
334-
335-
return NULL;
336336
}
337337

338338
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)
342342
return adf_4xxx_fw_cy_config[obj_num].ae_mask;
343343
case SVC_DC:
344344
return adf_4xxx_fw_dc_config[obj_num].ae_mask;
345+
default:
346+
return 0;
345347
}
346-
347-
return 0;
348348
}
349349

350350
void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)

drivers/crypto/intel/qat/qat_common/qat_algs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ static int qat_get_inter_state_size(enum icp_qat_hw_auth_algo qat_hash_alg)
106106
default:
107107
return -EFAULT;
108108
}
109-
return -EFAULT;
110109
}
111110

112111
static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,

0 commit comments

Comments
 (0)