Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Adam Guerin and committed by
Herbert Xu
038ccc28 f75bd28b

+10 -11
+10 -10
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c
··· 214 214 return capabilities_cy; 215 215 case SVC_DC: 216 216 return capabilities_dc; 217 + default: 218 + return 0; 217 219 } 218 - 219 - return 0; 220 220 } 221 221 222 222 static enum dev_sku_info get_sku(struct adf_hw_device_data *self) ··· 231 231 return thrd_to_arb_map_cy; 232 232 case SVC_DC: 233 233 return thrd_to_arb_map_dc; 234 + default: 235 + return NULL; 234 236 } 235 - 236 - return NULL; 237 237 } 238 238 239 239 static void get_arb_info(struct arb_info *arb_info) ··· 318 318 return adf_4xxx_fw_cy_config[obj_num].obj_name; 319 319 case SVC_DC: 320 320 return adf_4xxx_fw_dc_config[obj_num].obj_name; 321 + default: 322 + return NULL; 321 323 } 322 - 323 - return NULL; 324 324 } 325 325 326 326 static char *uof_get_name_402xx(struct adf_accel_dev *accel_dev, u32 obj_num) ··· 330 330 return adf_402xx_fw_cy_config[obj_num].obj_name; 331 331 case SVC_DC: 332 332 return adf_402xx_fw_dc_config[obj_num].obj_name; 333 + default: 334 + return NULL; 333 335 } 334 - 335 - return NULL; 336 336 } 337 337 338 338 static u32 uof_get_ae_mask(struct adf_accel_dev *accel_dev, u32 obj_num) ··· 342 342 return adf_4xxx_fw_cy_config[obj_num].ae_mask; 343 343 case SVC_DC: 344 344 return adf_4xxx_fw_dc_config[obj_num].ae_mask; 345 + default: 346 + return 0; 345 347 } 346 - 347 - return 0; 348 348 } 349 349 350 350 void adf_init_hw_data_4xxx(struct adf_hw_device_data *hw_data, u32 dev_id)
-1
drivers/crypto/intel/qat/qat_common/qat_algs.c
··· 106 106 default: 107 107 return -EFAULT; 108 108 } 109 - return -EFAULT; 110 109 } 111 110 112 111 static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,