Commit 8977c824 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman

staging: ccree: remove inline qualifiers

The ccree drivers was marking a lot of big functions in C file as
static inline for no good reason. Remove the inline qualifier from
any but the few truly single line functions.
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 44208cf3
...@@ -733,7 +733,7 @@ static int ssi_ccm_setauthsize(struct crypto_aead *authenc, ...@@ -733,7 +733,7 @@ static int ssi_ccm_setauthsize(struct crypto_aead *authenc,
} }
#endif /*SSI_CC_HAS_AES_CCM*/ #endif /*SSI_CC_HAS_AES_CCM*/
static inline void static void
ssi_aead_create_assoc_desc( ssi_aead_create_assoc_desc(
struct aead_request *areq, struct aead_request *areq,
unsigned int flow_mode, unsigned int flow_mode,
...@@ -776,7 +776,7 @@ ssi_aead_create_assoc_desc( ...@@ -776,7 +776,7 @@ ssi_aead_create_assoc_desc(
*seq_size = (++idx); *seq_size = (++idx);
} }
static inline void static void
ssi_aead_process_authenc_data_desc( ssi_aead_process_authenc_data_desc(
struct aead_request *areq, struct aead_request *areq,
unsigned int flow_mode, unsigned int flow_mode,
...@@ -843,7 +843,7 @@ ssi_aead_process_authenc_data_desc( ...@@ -843,7 +843,7 @@ ssi_aead_process_authenc_data_desc(
*seq_size = (++idx); *seq_size = (++idx);
} }
static inline void static void
ssi_aead_process_cipher_data_desc( ssi_aead_process_cipher_data_desc(
struct aead_request *areq, struct aead_request *areq,
unsigned int flow_mode, unsigned int flow_mode,
...@@ -891,7 +891,7 @@ ssi_aead_process_cipher_data_desc( ...@@ -891,7 +891,7 @@ ssi_aead_process_cipher_data_desc(
*seq_size = (++idx); *seq_size = (++idx);
} }
static inline void ssi_aead_process_digest_result_desc( static void ssi_aead_process_digest_result_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -942,7 +942,7 @@ static inline void ssi_aead_process_digest_result_desc( ...@@ -942,7 +942,7 @@ static inline void ssi_aead_process_digest_result_desc(
*seq_size = (++idx); *seq_size = (++idx);
} }
static inline void ssi_aead_setup_cipher_desc( static void ssi_aead_setup_cipher_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -988,7 +988,7 @@ static inline void ssi_aead_setup_cipher_desc( ...@@ -988,7 +988,7 @@ static inline void ssi_aead_setup_cipher_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_process_cipher( static void ssi_aead_process_cipher(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size, unsigned int *seq_size,
...@@ -1014,7 +1014,7 @@ static inline void ssi_aead_process_cipher( ...@@ -1014,7 +1014,7 @@ static inline void ssi_aead_process_cipher(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_hmac_setup_digest_desc( static void ssi_aead_hmac_setup_digest_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1051,7 +1051,7 @@ static inline void ssi_aead_hmac_setup_digest_desc( ...@@ -1051,7 +1051,7 @@ static inline void ssi_aead_hmac_setup_digest_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_xcbc_setup_digest_desc( static void ssi_aead_xcbc_setup_digest_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1113,7 +1113,7 @@ static inline void ssi_aead_xcbc_setup_digest_desc( ...@@ -1113,7 +1113,7 @@ static inline void ssi_aead_xcbc_setup_digest_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_process_digest_header_desc( static void ssi_aead_process_digest_header_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1127,7 +1127,7 @@ static inline void ssi_aead_process_digest_header_desc( ...@@ -1127,7 +1127,7 @@ static inline void ssi_aead_process_digest_header_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_process_digest_scheme_desc( static void ssi_aead_process_digest_scheme_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1192,7 +1192,7 @@ static inline void ssi_aead_process_digest_scheme_desc( ...@@ -1192,7 +1192,7 @@ static inline void ssi_aead_process_digest_scheme_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_load_mlli_to_sram( static void ssi_aead_load_mlli_to_sram(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1222,7 +1222,7 @@ static inline void ssi_aead_load_mlli_to_sram( ...@@ -1222,7 +1222,7 @@ static inline void ssi_aead_load_mlli_to_sram(
} }
} }
static inline enum cc_flow_mode ssi_aead_get_data_flow_mode( static enum cc_flow_mode ssi_aead_get_data_flow_mode(
enum drv_crypto_direction direct, enum drv_crypto_direction direct,
enum cc_flow_mode setup_flow_mode, enum cc_flow_mode setup_flow_mode,
bool is_single_pass) bool is_single_pass)
...@@ -1248,7 +1248,7 @@ static inline enum cc_flow_mode ssi_aead_get_data_flow_mode( ...@@ -1248,7 +1248,7 @@ static inline enum cc_flow_mode ssi_aead_get_data_flow_mode(
return data_flow_mode; return data_flow_mode;
} }
static inline void ssi_aead_hmac_authenc( static void ssi_aead_hmac_authenc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1304,7 +1304,7 @@ static inline void ssi_aead_hmac_authenc( ...@@ -1304,7 +1304,7 @@ static inline void ssi_aead_hmac_authenc(
} }
} }
static inline void static void
ssi_aead_xcbc_authenc( ssi_aead_xcbc_authenc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
...@@ -1456,7 +1456,7 @@ static int set_msg_len(u8 *block, unsigned int msglen, unsigned int csize) ...@@ -1456,7 +1456,7 @@ static int set_msg_len(u8 *block, unsigned int msglen, unsigned int csize)
return 0; return 0;
} }
static inline int ssi_aead_ccm( static int ssi_aead_ccm(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1667,7 +1667,7 @@ static void ssi_rfc4309_ccm_process(struct aead_request *req) ...@@ -1667,7 +1667,7 @@ static void ssi_rfc4309_ccm_process(struct aead_request *req)
#if SSI_CC_HAS_AES_GCM #if SSI_CC_HAS_AES_GCM
static inline void ssi_aead_gcm_setup_ghash_desc( static void ssi_aead_gcm_setup_ghash_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1747,7 +1747,7 @@ static inline void ssi_aead_gcm_setup_ghash_desc( ...@@ -1747,7 +1747,7 @@ static inline void ssi_aead_gcm_setup_ghash_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_gcm_setup_gctr_desc( static void ssi_aead_gcm_setup_gctr_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1785,7 +1785,7 @@ static inline void ssi_aead_gcm_setup_gctr_desc( ...@@ -1785,7 +1785,7 @@ static inline void ssi_aead_gcm_setup_gctr_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline void ssi_aead_process_gcm_result_desc( static void ssi_aead_process_gcm_result_desc(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1851,7 +1851,7 @@ static inline void ssi_aead_process_gcm_result_desc( ...@@ -1851,7 +1851,7 @@ static inline void ssi_aead_process_gcm_result_desc(
*seq_size = idx; *seq_size = idx;
} }
static inline int ssi_aead_gcm( static int ssi_aead_gcm(
struct aead_request *req, struct aead_request *req,
struct cc_hw_desc desc[], struct cc_hw_desc desc[],
unsigned int *seq_size) unsigned int *seq_size)
...@@ -1892,7 +1892,7 @@ static inline int ssi_aead_gcm( ...@@ -1892,7 +1892,7 @@ static inline int ssi_aead_gcm(
} }
#ifdef CC_DEBUG #ifdef CC_DEBUG
static inline void ssi_aead_dump_gcm( static void ssi_aead_dump_gcm(
const char *title, const char *title,
struct aead_request *req) struct aead_request *req)
{ {
......
...@@ -80,8 +80,8 @@ static inline char *cc_dma_buf_type(enum ssi_req_dma_buf_type type) ...@@ -80,8 +80,8 @@ static inline char *cc_dma_buf_type(enum ssi_req_dma_buf_type type)
* @req: aead request object * @req: aead request object
* @dir: [IN] copy from/to sgl * @dir: [IN] copy from/to sgl
*/ */
static inline void cc_copy_mac(struct device *dev, struct aead_request *req, static void cc_copy_mac(struct device *dev, struct aead_request *req,
enum ssi_sg_cpy_direct dir) enum ssi_sg_cpy_direct dir)
{ {
struct aead_req_ctx *areq_ctx = aead_request_ctx(req); struct aead_req_ctx *areq_ctx = aead_request_ctx(req);
struct crypto_aead *tfm = crypto_aead_reqtfm(req); struct crypto_aead *tfm = crypto_aead_reqtfm(req);
...@@ -168,7 +168,7 @@ void cc_copy_sg_portion( ...@@ -168,7 +168,7 @@ void cc_copy_sg_portion(
(direct == SSI_SG_TO_BUF)); (direct == SSI_SG_TO_BUF));
} }
static inline int cc_render_buff_to_mlli( static int cc_render_buff_to_mlli(
struct device *dev, dma_addr_t buff_dma, u32 buff_size, struct device *dev, dma_addr_t buff_dma, u32 buff_size,
u32 *curr_nents, u32 **mlli_entry_pp) u32 *curr_nents, u32 **mlli_entry_pp)
{ {
...@@ -204,7 +204,7 @@ static inline int cc_render_buff_to_mlli( ...@@ -204,7 +204,7 @@ static inline int cc_render_buff_to_mlli(
return 0; return 0;
} }
static inline int cc_render_sg_to_mlli( static int cc_render_sg_to_mlli(
struct device *dev, struct scatterlist *sgl, struct device *dev, struct scatterlist *sgl,
u32 sgl_data_len, u32 sgl_offset, u32 *curr_nents, u32 sgl_data_len, u32 sgl_offset, u32 *curr_nents,
u32 **mlli_entry_pp) u32 **mlli_entry_pp)
...@@ -293,7 +293,7 @@ static int cc_generate_mlli( ...@@ -293,7 +293,7 @@ static int cc_generate_mlli(
return rc; return rc;
} }
static inline void cc_add_buffer_entry( static void cc_add_buffer_entry(
struct device *dev, struct buffer_array *sgl_data, struct device *dev, struct buffer_array *sgl_data,
dma_addr_t buffer_dma, unsigned int buffer_len, dma_addr_t buffer_dma, unsigned int buffer_len,
bool is_last_entry, u32 *mlli_nents) bool is_last_entry, u32 *mlli_nents)
...@@ -314,7 +314,7 @@ static inline void cc_add_buffer_entry( ...@@ -314,7 +314,7 @@ static inline void cc_add_buffer_entry(
sgl_data->num_of_buffers++; sgl_data->num_of_buffers++;
} }
static inline void cc_add_sg_entry( static void cc_add_sg_entry(
struct device *dev, struct device *dev,
struct buffer_array *sgl_data, struct buffer_array *sgl_data,
unsigned int nents, unsigned int nents,
...@@ -425,7 +425,7 @@ static int cc_map_sg( ...@@ -425,7 +425,7 @@ static int cc_map_sg(
return 0; return 0;
} }
static inline int static int
ssi_aead_handle_config_buf(struct device *dev, ssi_aead_handle_config_buf(struct device *dev,
struct aead_req_ctx *areq_ctx, struct aead_req_ctx *areq_ctx,
u8 *config_data, u8 *config_data,
...@@ -455,11 +455,10 @@ ssi_aead_handle_config_buf(struct device *dev, ...@@ -455,11 +455,10 @@ ssi_aead_handle_config_buf(struct device *dev,
return 0; return 0;
} }
static inline int ssi_ahash_handle_curr_buf(struct device *dev, static int ssi_ahash_handle_curr_buf(struct device *dev,
struct ahash_req_ctx *areq_ctx, struct ahash_req_ctx *areq_ctx,
u8 *curr_buff, u8 *curr_buff, u32 curr_buff_cnt,
u32 curr_buff_cnt, struct buffer_array *sg_data)
struct buffer_array *sg_data)
{ {
dev_dbg(dev, " handle curr buff %x set to DLLI\n", curr_buff_cnt); dev_dbg(dev, " handle curr buff %x set to DLLI\n", curr_buff_cnt);
/* create sg for the current buffer */ /* create sg for the current buffer */
...@@ -710,7 +709,7 @@ void cc_unmap_aead_request(struct device *dev, struct aead_request *req) ...@@ -710,7 +709,7 @@ void cc_unmap_aead_request(struct device *dev, struct aead_request *req)
} }
} }
static inline int cc_get_aead_icv_nents( static int cc_get_aead_icv_nents(
struct device *dev, struct device *dev,
struct scatterlist *sgl, struct scatterlist *sgl,
unsigned int sgl_nents, unsigned int sgl_nents,
...@@ -764,7 +763,7 @@ static inline int cc_get_aead_icv_nents( ...@@ -764,7 +763,7 @@ static inline int cc_get_aead_icv_nents(
return nents; return nents;
} }
static inline int cc_aead_chain_iv( static int cc_aead_chain_iv(
struct ssi_drvdata *drvdata, struct ssi_drvdata *drvdata,
struct aead_request *req, struct aead_request *req,
struct buffer_array *sg_data, struct buffer_array *sg_data,
...@@ -809,7 +808,7 @@ static inline int cc_aead_chain_iv( ...@@ -809,7 +808,7 @@ static inline int cc_aead_chain_iv(
return rc; return rc;
} }
static inline int cc_aead_chain_assoc( static int cc_aead_chain_assoc(
struct ssi_drvdata *drvdata, struct ssi_drvdata *drvdata,
struct aead_request *req, struct aead_request *req,
struct buffer_array *sg_data, struct buffer_array *sg_data,
...@@ -904,7 +903,7 @@ static inline int cc_aead_chain_assoc( ...@@ -904,7 +903,7 @@ static inline int cc_aead_chain_assoc(
return rc; return rc;
} }
static inline void cc_prepare_aead_data_dlli( static void cc_prepare_aead_data_dlli(
struct aead_request *req, struct aead_request *req,
u32 *src_last_bytes, u32 *dst_last_bytes) u32 *src_last_bytes, u32 *dst_last_bytes)
{ {
...@@ -940,7 +939,7 @@ static inline void cc_prepare_aead_data_dlli( ...@@ -940,7 +939,7 @@ static inline void cc_prepare_aead_data_dlli(
} }
} }
static inline int cc_prepare_aead_data_mlli( static int cc_prepare_aead_data_mlli(
struct ssi_drvdata *drvdata, struct ssi_drvdata *drvdata,
struct aead_request *req, struct aead_request *req,
struct buffer_array *sg_data, struct buffer_array *sg_data,
...@@ -1075,7 +1074,7 @@ static inline int cc_prepare_aead_data_mlli( ...@@ -1075,7 +1074,7 @@ static inline int cc_prepare_aead_data_mlli(
return rc; return rc;
} }
static inline int cc_aead_chain_data( static int cc_aead_chain_data(
struct ssi_drvdata *drvdata, struct ssi_drvdata *drvdata,
struct aead_request *req, struct aead_request *req,
struct buffer_array *sg_data, struct buffer_array *sg_data,
......
...@@ -432,7 +432,7 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm, ...@@ -432,7 +432,7 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm,
return 0; return 0;
} }
static inline void static void
ssi_blkcipher_create_setup_desc( ssi_blkcipher_create_setup_desc(
struct crypto_tfm *tfm, struct crypto_tfm *tfm,
struct blkcipher_req_ctx *req_ctx, struct blkcipher_req_ctx *req_ctx,
...@@ -562,7 +562,7 @@ ssi_blkcipher_create_setup_desc( ...@@ -562,7 +562,7 @@ ssi_blkcipher_create_setup_desc(
} }
#if SSI_CC_HAS_MULTI2 #if SSI_CC_HAS_MULTI2
static inline void ssi_blkcipher_create_multi2_setup_desc( static void ssi_blkcipher_create_multi2_setup_desc(
struct crypto_tfm *tfm, struct crypto_tfm *tfm,
struct blkcipher_req_ctx *req_ctx, struct blkcipher_req_ctx *req_ctx,
unsigned int ivsize, unsigned int ivsize,
...@@ -606,7 +606,7 @@ static inline void ssi_blkcipher_create_multi2_setup_desc( ...@@ -606,7 +606,7 @@ static inline void ssi_blkcipher_create_multi2_setup_desc(
} }
#endif /*SSI_CC_HAS_MULTI2*/ #endif /*SSI_CC_HAS_MULTI2*/
static inline void static void
ssi_blkcipher_create_data_desc( ssi_blkcipher_create_data_desc(
struct crypto_tfm *tfm, struct crypto_tfm *tfm,
struct blkcipher_req_ctx *req_ctx, struct blkcipher_req_ctx *req_ctx,
......
...@@ -114,7 +114,7 @@ static void ssi_hash_create_data_desc( ...@@ -114,7 +114,7 @@ static void ssi_hash_create_data_desc(
bool is_not_last_data, bool is_not_last_data,
unsigned int *seq_size); unsigned int *seq_size);
static inline void ssi_set_hash_endianity(u32 mode, struct cc_hw_desc *desc) static void ssi_set_hash_endianity(u32 mode, struct cc_hw_desc *desc)
{ {
if (unlikely(mode == DRV_HASH_MD5 || if (unlikely(mode == DRV_HASH_MD5 ||
mode == DRV_HASH_SHA384 || mode == DRV_HASH_SHA384 ||
......
...@@ -165,7 +165,7 @@ int request_mgr_init(struct ssi_drvdata *drvdata) ...@@ -165,7 +165,7 @@ int request_mgr_init(struct ssi_drvdata *drvdata)
return rc; return rc;
} }
static inline void enqueue_seq( static void enqueue_seq(
void __iomem *cc_base, void __iomem *cc_base,
struct cc_hw_desc seq[], unsigned int seq_len) struct cc_hw_desc seq[], unsigned int seq_len)
{ {
...@@ -202,7 +202,7 @@ static void request_mgr_complete(struct device *dev, void *dx_compl_h) ...@@ -202,7 +202,7 @@ static void request_mgr_complete(struct device *dev, void *dx_compl_h)
complete(this_compl); complete(this_compl);
} }
static inline int request_mgr_queues_status_check( static int request_mgr_queues_status_check(
struct ssi_drvdata *drvdata, struct ssi_drvdata *drvdata,
struct ssi_request_mgr_handle *req_mgr_h, struct ssi_request_mgr_handle *req_mgr_h,
unsigned int total_seq_len) unsigned int total_seq_len)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment