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

crypto: qat - make state machine functions static

The state machine functions adf_dev_init(), adf_dev_start(),
adf_dev_stop() adf_dev_shutdown() and adf_dev_shutdown_cache_cfg()
are only used internally within adf_init.c.
Do not export these functions and make them static as state transitions
are now performed using the safe function adf_dev_up() and
adf_dev_down().

This commit does not implement any functional change.

Signed-off-by: Shashank Gupta <shashank.gupta@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Shashank Gupta and committed by
Herbert Xu
88fca80e b97c5377

+5 -15
-6
drivers/crypto/qat/qat_common/adf_common_drv.h
··· 52 52 int adf_service_register(struct service_hndl *service); 53 53 int adf_service_unregister(struct service_hndl *service); 54 54 55 - int adf_dev_init(struct adf_accel_dev *accel_dev); 56 - int adf_dev_start(struct adf_accel_dev *accel_dev); 57 - void adf_dev_stop(struct adf_accel_dev *accel_dev); 58 - void adf_dev_shutdown(struct adf_accel_dev *accel_dev); 59 - int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev); 60 - 61 55 int adf_dev_up(struct adf_accel_dev *accel_dev, bool init_config); 62 56 int adf_dev_down(struct adf_accel_dev *accel_dev, bool cache_config); 63 57 int adf_dev_restart(struct adf_accel_dev *accel_dev);
+5 -9
drivers/crypto/qat/qat_common/adf_init.c
··· 56 56 * 57 57 * Return: 0 on success, error code otherwise. 58 58 */ 59 - int adf_dev_init(struct adf_accel_dev *accel_dev) 59 + static int adf_dev_init(struct adf_accel_dev *accel_dev) 60 60 { 61 61 struct service_hndl *service; 62 62 struct list_head *list_itr; ··· 146 146 147 147 return 0; 148 148 } 149 - EXPORT_SYMBOL_GPL(adf_dev_init); 150 149 151 150 /** 152 151 * adf_dev_start() - Start acceleration service for the given accel device ··· 157 158 * 158 159 * Return: 0 on success, error code otherwise. 159 160 */ 160 - int adf_dev_start(struct adf_accel_dev *accel_dev) 161 + static int adf_dev_start(struct adf_accel_dev *accel_dev) 161 162 { 162 163 struct adf_hw_device_data *hw_data = accel_dev->hw_device; 163 164 struct service_hndl *service; ··· 218 219 } 219 220 return 0; 220 221 } 221 - EXPORT_SYMBOL_GPL(adf_dev_start); 222 222 223 223 /** 224 224 * adf_dev_stop() - Stop acceleration service for the given accel device ··· 229 231 * 230 232 * Return: void 231 233 */ 232 - void adf_dev_stop(struct adf_accel_dev *accel_dev) 234 + static void adf_dev_stop(struct adf_accel_dev *accel_dev) 233 235 { 234 236 struct service_hndl *service; 235 237 struct list_head *list_itr; ··· 274 276 clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status); 275 277 } 276 278 } 277 - EXPORT_SYMBOL_GPL(adf_dev_stop); 278 279 279 280 /** 280 281 * adf_dev_shutdown() - shutdown acceleration services and data strucutures ··· 282 285 * Cleanup the ring data structures and the admin comms and arbitration 283 286 * services. 284 287 */ 285 - void adf_dev_shutdown(struct adf_accel_dev *accel_dev) 288 + static void adf_dev_shutdown(struct adf_accel_dev *accel_dev) 286 289 { 287 290 struct adf_hw_device_data *hw_data = accel_dev->hw_device; 288 291 struct service_hndl *service; ··· 340 343 adf_cleanup_etr_data(accel_dev); 341 344 adf_dev_restore(accel_dev); 342 345 } 343 - EXPORT_SYMBOL_GPL(adf_dev_shutdown); 344 346 345 347 int adf_dev_restarting_notify(struct adf_accel_dev *accel_dev) 346 348 { ··· 371 375 return 0; 372 376 } 373 377 374 - int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev) 378 + static int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev) 375 379 { 376 380 char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0}; 377 381 int ret;