From patchwork Sun Dec 3 13:58:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 120457 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3360892qgn; Sun, 3 Dec 2017 05:59:24 -0800 (PST) X-Google-Smtp-Source: AGs4zMZkLz2pm0de+Ucl0MiumhAhA9MQYIV4JG6wwRBYOZaYexMYYwxAI7daTUpdpLt6MI7MwaC/ X-Received: by 10.98.66.196 with SMTP id h65mr16453053pfd.172.1512309564802; Sun, 03 Dec 2017 05:59:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512309564; cv=none; d=google.com; s=arc-20160816; b=lSpGZVYjg3rNvpjURVeUDCnISskhNzNJx2TUiw/KnuI7t4IQ4ug413hW2YGiPbnVSw /DGedhoMtC0Qyv1ag+sgMesaYeGseuMY0blNeZhiBSdBEHF2QFysuwV6NTbzdnup0zil tA+72/ZtzZD2fJBDl61RfvfgUQgGuH9CxcnHvu9eValwbnBZIgwDGpDggjG0e4fd3f9H /RiXPbAU7FZaXbn/qf79W5gnVoClvZFQEuVHZl135zvaqW9eO0+oPJwbc5erjk0AMIwS UOCdnh5UJZs9d/5Qi4Mg44Z9JYw3A4l1dNTRU2QUR5kAwZAgzBiu1i/jJlfexeo5wRik X11Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=lfOJTfLJa10aPcH+xF++omU8YzQIGmHH5wxPEvyQ5oY=; b=l57BOf48sa0rfr7Qi/3unEEmCsz++Htcm1GT+Kb2PviQ8eyS6sDx576RkbvSjxR7hC bi1sY3aJfhcIYmaGt4m9eui/z5AS+AgC+RdhxbICRGqEApfgVfO1NvwScG2RT2QkSvaA p+c3svqEFwcAP7MAdrz5ER479grP8AHt5ZTmRqlktjUftIoousERZ8axD4G9dneTH+hy ObGbH0E7IuGyFSNtoxyDI9AmRZsAIgn+x+feD4c1+X3qIAq7HsaTrcE7ASuaGHe+lngk j1rAvtILBruVDpuB8pMluBIkADJW26kL0hNas0Z25P1cfdyU8X17R1/MolMOp29+NqIE r9xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h188si4492740pgc.559.2017.12.03.05.59.24; Sun, 03 Dec 2017 05:59:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbdLCN7V (ORCPT + 1 other); Sun, 3 Dec 2017 08:59:21 -0500 Received: from foss.arm.com ([217.140.101.70]:55140 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbdLCN7S (ORCPT ); Sun, 3 Dec 2017 08:59:18 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 18E9F1529; Sun, 3 Dec 2017 05:59:18 -0800 (PST) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5CD473F24A; Sun, 3 Dec 2017 05:59:15 -0800 (PST) From: Gilad Ben-Yossef To: Greg Kroah-Hartman Cc: Ofir Drang , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org Subject: [PATCH 01/10] staging: ccree: remove inline qualifiers Date: Sun, 3 Dec 2017 13:58:12 +0000 Message-Id: <1512309503-29766-2-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512309503-29766-1-git-send-email-gilad@benyossef.com> References: <1512309503-29766-1-git-send-email-gilad@benyossef.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 40 ++++++++++++++++----------------- drivers/staging/ccree/ssi_buffer_mgr.c | 35 ++++++++++++++--------------- drivers/staging/ccree/ssi_cipher.c | 6 ++--- drivers/staging/ccree/ssi_hash.c | 2 +- drivers/staging/ccree/ssi_request_mgr.c | 4 ++-- 5 files changed, 43 insertions(+), 44 deletions(-) -- 2.7.4 diff --git a/drivers/staging/ccree/ssi_aead.c b/drivers/staging/ccree/ssi_aead.c index 2cd2b0f..56a4059 100644 --- a/drivers/staging/ccree/ssi_aead.c +++ b/drivers/staging/ccree/ssi_aead.c @@ -733,7 +733,7 @@ static int ssi_ccm_setauthsize(struct crypto_aead *authenc, } #endif /*SSI_CC_HAS_AES_CCM*/ -static inline void +static void ssi_aead_create_assoc_desc( struct aead_request *areq, unsigned int flow_mode, @@ -776,7 +776,7 @@ ssi_aead_create_assoc_desc( *seq_size = (++idx); } -static inline void +static void ssi_aead_process_authenc_data_desc( struct aead_request *areq, unsigned int flow_mode, @@ -843,7 +843,7 @@ ssi_aead_process_authenc_data_desc( *seq_size = (++idx); } -static inline void +static void ssi_aead_process_cipher_data_desc( struct aead_request *areq, unsigned int flow_mode, @@ -891,7 +891,7 @@ ssi_aead_process_cipher_data_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -942,7 +942,7 @@ static inline void ssi_aead_process_digest_result_desc( *seq_size = (++idx); } -static inline void ssi_aead_setup_cipher_desc( +static void ssi_aead_setup_cipher_desc( struct aead_request *req, struct cc_hw_desc desc[], unsigned int *seq_size) @@ -988,7 +988,7 @@ static inline void ssi_aead_setup_cipher_desc( *seq_size = idx; } -static inline void ssi_aead_process_cipher( +static void ssi_aead_process_cipher( struct aead_request *req, struct cc_hw_desc desc[], unsigned int *seq_size, @@ -1014,7 +1014,7 @@ static inline void ssi_aead_process_cipher( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1051,7 +1051,7 @@ static inline void ssi_aead_hmac_setup_digest_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1113,7 +1113,7 @@ static inline void ssi_aead_xcbc_setup_digest_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1127,7 +1127,7 @@ static inline void ssi_aead_process_digest_header_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1192,7 +1192,7 @@ static inline void ssi_aead_process_digest_scheme_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -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 cc_flow_mode setup_flow_mode, bool is_single_pass) @@ -1248,7 +1248,7 @@ static inline enum cc_flow_mode ssi_aead_get_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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1304,7 +1304,7 @@ static inline void ssi_aead_hmac_authenc( } } -static inline void +static void ssi_aead_xcbc_authenc( struct aead_request *req, struct cc_hw_desc desc[], @@ -1456,7 +1456,7 @@ static int set_msg_len(u8 *block, unsigned int msglen, unsigned int csize) return 0; } -static inline int ssi_aead_ccm( +static int ssi_aead_ccm( struct aead_request *req, struct cc_hw_desc desc[], unsigned int *seq_size) @@ -1667,7 +1667,7 @@ static void ssi_rfc4309_ccm_process(struct aead_request *req) #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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1747,7 +1747,7 @@ static inline void ssi_aead_gcm_setup_ghash_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1785,7 +1785,7 @@ static inline void ssi_aead_gcm_setup_gctr_desc( *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 cc_hw_desc desc[], unsigned int *seq_size) @@ -1851,7 +1851,7 @@ static inline void ssi_aead_process_gcm_result_desc( *seq_size = idx; } -static inline int ssi_aead_gcm( +static int ssi_aead_gcm( struct aead_request *req, struct cc_hw_desc desc[], unsigned int *seq_size) @@ -1892,7 +1892,7 @@ static inline int ssi_aead_gcm( } #ifdef CC_DEBUG -static inline void ssi_aead_dump_gcm( +static void ssi_aead_dump_gcm( const char *title, struct aead_request *req) { diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c index c542225..dc45333 100644 --- a/drivers/staging/ccree/ssi_buffer_mgr.c +++ b/drivers/staging/ccree/ssi_buffer_mgr.c @@ -80,8 +80,8 @@ static inline char *cc_dma_buf_type(enum ssi_req_dma_buf_type type) * @req: aead request object * @dir: [IN] copy from/to sgl */ -static inline void cc_copy_mac(struct device *dev, struct aead_request *req, - enum ssi_sg_cpy_direct dir) +static void cc_copy_mac(struct device *dev, struct aead_request *req, + enum ssi_sg_cpy_direct dir) { struct aead_req_ctx *areq_ctx = aead_request_ctx(req); struct crypto_aead *tfm = crypto_aead_reqtfm(req); @@ -168,7 +168,7 @@ void cc_copy_sg_portion( (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, u32 *curr_nents, u32 **mlli_entry_pp) { @@ -204,7 +204,7 @@ static inline int cc_render_buff_to_mlli( return 0; } -static inline int cc_render_sg_to_mlli( +static int cc_render_sg_to_mlli( struct device *dev, struct scatterlist *sgl, u32 sgl_data_len, u32 sgl_offset, u32 *curr_nents, u32 **mlli_entry_pp) @@ -293,7 +293,7 @@ static int cc_generate_mlli( return rc; } -static inline void cc_add_buffer_entry( +static void cc_add_buffer_entry( struct device *dev, struct buffer_array *sgl_data, dma_addr_t buffer_dma, unsigned int buffer_len, bool is_last_entry, u32 *mlli_nents) @@ -314,7 +314,7 @@ static inline void cc_add_buffer_entry( sgl_data->num_of_buffers++; } -static inline void cc_add_sg_entry( +static void cc_add_sg_entry( struct device *dev, struct buffer_array *sgl_data, unsigned int nents, @@ -425,7 +425,7 @@ static int cc_map_sg( return 0; } -static inline int +static int ssi_aead_handle_config_buf(struct device *dev, struct aead_req_ctx *areq_ctx, u8 *config_data, @@ -455,11 +455,10 @@ ssi_aead_handle_config_buf(struct device *dev, return 0; } -static inline int ssi_ahash_handle_curr_buf(struct device *dev, - struct ahash_req_ctx *areq_ctx, - u8 *curr_buff, - u32 curr_buff_cnt, - struct buffer_array *sg_data) +static int ssi_ahash_handle_curr_buf(struct device *dev, + struct ahash_req_ctx *areq_ctx, + u8 *curr_buff, u32 curr_buff_cnt, + struct buffer_array *sg_data) { dev_dbg(dev, " handle curr buff %x set to DLLI\n", curr_buff_cnt); /* create sg for the current buffer */ @@ -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 scatterlist *sgl, unsigned int sgl_nents, @@ -764,7 +763,7 @@ static inline int cc_get_aead_icv_nents( return nents; } -static inline int cc_aead_chain_iv( +static int cc_aead_chain_iv( struct ssi_drvdata *drvdata, struct aead_request *req, struct buffer_array *sg_data, @@ -809,7 +808,7 @@ static inline int cc_aead_chain_iv( return rc; } -static inline int cc_aead_chain_assoc( +static int cc_aead_chain_assoc( struct ssi_drvdata *drvdata, struct aead_request *req, struct buffer_array *sg_data, @@ -904,7 +903,7 @@ static inline int cc_aead_chain_assoc( return rc; } -static inline void cc_prepare_aead_data_dlli( +static void cc_prepare_aead_data_dlli( struct aead_request *req, u32 *src_last_bytes, u32 *dst_last_bytes) { @@ -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 aead_request *req, struct buffer_array *sg_data, @@ -1075,7 +1074,7 @@ static inline int cc_prepare_aead_data_mlli( return rc; } -static inline int cc_aead_chain_data( +static int cc_aead_chain_data( struct ssi_drvdata *drvdata, struct aead_request *req, struct buffer_array *sg_data, diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c index f6e680c..6c4b93d 100644 --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -432,7 +432,7 @@ static int ssi_blkcipher_setkey(struct crypto_tfm *tfm, return 0; } -static inline void +static void ssi_blkcipher_create_setup_desc( struct crypto_tfm *tfm, struct blkcipher_req_ctx *req_ctx, @@ -562,7 +562,7 @@ ssi_blkcipher_create_setup_desc( } #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 blkcipher_req_ctx *req_ctx, unsigned int ivsize, @@ -606,7 +606,7 @@ static inline void ssi_blkcipher_create_multi2_setup_desc( } #endif /*SSI_CC_HAS_MULTI2*/ -static inline void +static void ssi_blkcipher_create_data_desc( struct crypto_tfm *tfm, struct blkcipher_req_ctx *req_ctx, diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index 4d79725..c955e50 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -114,7 +114,7 @@ static void ssi_hash_create_data_desc( bool is_not_last_data, 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 || mode == DRV_HASH_SHA384 || diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 0882efd..9883d14 100644 --- a/drivers/staging/ccree/ssi_request_mgr.c +++ b/drivers/staging/ccree/ssi_request_mgr.c @@ -165,7 +165,7 @@ int request_mgr_init(struct ssi_drvdata *drvdata) return rc; } -static inline void enqueue_seq( +static void enqueue_seq( void __iomem *cc_base, 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) complete(this_compl); } -static inline int request_mgr_queues_status_check( +static int request_mgr_queues_status_check( struct ssi_drvdata *drvdata, struct ssi_request_mgr_handle *req_mgr_h, unsigned int total_seq_len)