summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ccree/ssi_buffer_mgr.c
diff options
context:
space:
mode:
authorGilad Ben-Yossef <gilad@benyossef.com>2017-06-27 10:27:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-29 16:38:51 +0200
commit492ddcbb2103ea28217e5fea1a5c769254934c46 (patch)
treec758907a8a55ff3d7b0af5a72c7e8a3af5ebdcd9 /drivers/staging/ccree/ssi_buffer_mgr.c
parente8e5110e6be0889abd0913dc00d8731e3c0f7742 (diff)
downloadop-kernel-dev-492ddcbb2103ea28217e5fea1a5c769254934c46.zip
op-kernel-dev-492ddcbb2103ea28217e5fea1a5c769254934c46.tar.gz
staging: ccree: remove/add (un)needed blank lines
Remove or add blank lines as needed to match coding style. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/ssi_buffer_mgr.c')
-rw-r--r--drivers/staging/ccree/ssi_buffer_mgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index 1b41c12..b35871e 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -42,7 +42,6 @@
#define GET_DMA_BUFFER_TYPE(buff_type)
#endif
-
enum dma_buffer_type {
DMA_NULL_TYPE = -1,
DMA_SGL_TYPE = 1,
@@ -80,6 +79,7 @@ static unsigned int ssi_buffer_mgr_get_sgl_nents(
struct scatterlist *sg_list, unsigned int nbytes, u32 *lbytes, bool *is_chained)
{
unsigned int nents = 0;
+
while (nbytes != 0) {
if (sg_is_chain(sg_list)) {
SSI_LOG_ERR("Unexpected chained entry "
@@ -181,7 +181,6 @@ static inline int ssi_buffer_mgr_render_buff_to_mlli(
return 0;
}
-
static inline int ssi_buffer_mgr_render_scatterlist_to_mlli(
struct scatterlist *sgl, u32 sgl_data_len, u32 sglOffset, u32 *curr_nents,
u32 **mlli_entry_pp)
@@ -322,6 +321,7 @@ ssi_buffer_mgr_dma_map_sg(struct device *dev, struct scatterlist *sg, u32 nents,
{
u32 i, j;
struct scatterlist *l_sg = sg;
+
for (i = 0; i < nents; i++) {
if (!l_sg)
break;
@@ -441,7 +441,6 @@ 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,
@@ -700,6 +699,7 @@ void ssi_buffer_mgr_unmap_aead_request(
likely(req->src == req->dst))
{
u32 size_to_skip = req->assoclen;
+
if (areq_ctx->is_gcm4543)
size_to_skip += crypto_aead_ivsize(tfm);
@@ -1027,6 +1027,7 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli(
* MAC verification upon request completion
*/
u32 size_to_skip = req->assoclen;
+
if (areq_ctx->is_gcm4543)
size_to_skip += crypto_aead_ivsize(tfm);
OpenPOWER on IntegriCloud