Skip to content

Commit 88fca80

Browse files
guptas2herbertx
authored andcommitted
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 <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent b97c537 commit 88fca80

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

drivers/crypto/qat/qat_common/adf_common_drv.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ struct service_hndl {
5252
int adf_service_register(struct service_hndl *service);
5353
int adf_service_unregister(struct service_hndl *service);
5454

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-
6155
int adf_dev_up(struct adf_accel_dev *accel_dev, bool init_config);
6256
int adf_dev_down(struct adf_accel_dev *accel_dev, bool cache_config);
6357
int adf_dev_restart(struct adf_accel_dev *accel_dev);

drivers/crypto/qat/qat_common/adf_init.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int adf_service_unregister(struct service_hndl *service)
5656
*
5757
* Return: 0 on success, error code otherwise.
5858
*/
59-
int adf_dev_init(struct adf_accel_dev *accel_dev)
59+
static int adf_dev_init(struct adf_accel_dev *accel_dev)
6060
{
6161
struct service_hndl *service;
6262
struct list_head *list_itr;
@@ -146,7 +146,6 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)
146146

147147
return 0;
148148
}
149-
EXPORT_SYMBOL_GPL(adf_dev_init);
150149

151150
/**
152151
* adf_dev_start() - Start acceleration service for the given accel device
@@ -158,7 +157,7 @@ EXPORT_SYMBOL_GPL(adf_dev_init);
158157
*
159158
* Return: 0 on success, error code otherwise.
160159
*/
161-
int adf_dev_start(struct adf_accel_dev *accel_dev)
160+
static int adf_dev_start(struct adf_accel_dev *accel_dev)
162161
{
163162
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
164163
struct service_hndl *service;
@@ -219,7 +218,6 @@ int adf_dev_start(struct adf_accel_dev *accel_dev)
219218
}
220219
return 0;
221220
}
222-
EXPORT_SYMBOL_GPL(adf_dev_start);
223221

224222
/**
225223
* adf_dev_stop() - Stop acceleration service for the given accel device
@@ -231,7 +229,7 @@ EXPORT_SYMBOL_GPL(adf_dev_start);
231229
*
232230
* Return: void
233231
*/
234-
void adf_dev_stop(struct adf_accel_dev *accel_dev)
232+
static void adf_dev_stop(struct adf_accel_dev *accel_dev)
235233
{
236234
struct service_hndl *service;
237235
struct list_head *list_itr;
@@ -276,7 +274,6 @@ void adf_dev_stop(struct adf_accel_dev *accel_dev)
276274
clear_bit(ADF_STATUS_AE_STARTED, &accel_dev->status);
277275
}
278276
}
279-
EXPORT_SYMBOL_GPL(adf_dev_stop);
280277

281278
/**
282279
* adf_dev_shutdown() - shutdown acceleration services and data strucutures
@@ -285,7 +282,7 @@ EXPORT_SYMBOL_GPL(adf_dev_stop);
285282
* Cleanup the ring data structures and the admin comms and arbitration
286283
* services.
287284
*/
288-
void adf_dev_shutdown(struct adf_accel_dev *accel_dev)
285+
static void adf_dev_shutdown(struct adf_accel_dev *accel_dev)
289286
{
290287
struct adf_hw_device_data *hw_data = accel_dev->hw_device;
291288
struct service_hndl *service;
@@ -343,7 +340,6 @@ void adf_dev_shutdown(struct adf_accel_dev *accel_dev)
343340
adf_cleanup_etr_data(accel_dev);
344341
adf_dev_restore(accel_dev);
345342
}
346-
EXPORT_SYMBOL_GPL(adf_dev_shutdown);
347343

348344
int adf_dev_restarting_notify(struct adf_accel_dev *accel_dev)
349345
{
@@ -375,7 +371,7 @@ int adf_dev_restarted_notify(struct adf_accel_dev *accel_dev)
375371
return 0;
376372
}
377373

378-
int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev)
374+
static int adf_dev_shutdown_cache_cfg(struct adf_accel_dev *accel_dev)
379375
{
380376
char services[ADF_CFG_MAX_VAL_LEN_IN_BYTES] = {0};
381377
int ret;

0 commit comments

Comments
 (0)