All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c
@ 2017-10-27 14:53 ` Stephen Brennan
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Brennan @ 2017-10-27 14:53 UTC (permalink / raw)
  To: Gilad Ben-Yossef, Greg Kroah-Hartman, linux-crypto,
	driverdev-devel, linux-kernel
  Cc: Stephen Brennan

In particular, fixes some over-indented if statement bodies as well as a
couple lines indented with spaces. checkpatch.pl now reports no warnings
on this file other than 80 character warnings.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
---
V2 also fixes an overlooked indentation error that checkpatch didn't catch.

 drivers/staging/ccree/ssi_buffer_mgr.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index dca3ce84d043..1f8a225530a8 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -406,8 +406,8 @@ ssi_aead_handle_config_buf(struct device *dev,
 	sg_init_one(&areq_ctx->ccm_adata_sg, config_data, AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size);
 	if (unlikely(dma_map_sg(dev, &areq_ctx->ccm_adata_sg, 1,
 				DMA_TO_DEVICE) != 1)) {
-			dev_err(dev, "dma_map_sg() config buffer failed\n");
-			return -ENOMEM;
+		dev_err(dev, "dma_map_sg() config buffer failed\n");
+		return -ENOMEM;
 	}
 	dev_dbg(dev, "Mapped curr_buff: dma_address=%pad page=%p addr=%pK offset=%u length=%u\n",
 		&sg_dma_address(&areq_ctx->ccm_adata_sg),
@@ -435,8 +435,8 @@ static inline int ssi_ahash_handle_curr_buf(struct device *dev,
 	sg_init_one(areq_ctx->buff_sg, curr_buff, curr_buff_cnt);
 	if (unlikely(dma_map_sg(dev, areq_ctx->buff_sg, 1,
 				DMA_TO_DEVICE) != 1)) {
-			dev_err(dev, "dma_map_sg() src buffer failed\n");
-			return -ENOMEM;
+		dev_err(dev, "dma_map_sg() src buffer failed\n");
+		return -ENOMEM;
 	}
 	dev_dbg(dev, "Mapped curr_buff: dma_address=%pad page=%p addr=%pK offset=%u length=%u\n",
 		&sg_dma_address(areq_ctx->buff_sg), sg_page(areq_ctx->buff_sg),
@@ -1029,12 +1029,12 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli(
 			 * verification is made by CPU compare in order to simplify
 			 * MAC verification upon request completion
 			 */
-			  u32 size_to_skip = req->assoclen;
+			u32 size_to_skip = req->assoclen;
 
-			  if (areq_ctx->is_gcm4543)
-				  size_to_skip += crypto_aead_ivsize(tfm);
+			if (areq_ctx->is_gcm4543)
+				size_to_skip += crypto_aead_ivsize(tfm);
 
-			  ssi_buffer_mgr_copy_scatterlist_portion(
+			ssi_buffer_mgr_copy_scatterlist_portion(
 				dev, areq_ctx->backup_mac, req->src,
 				size_to_skip + req->cryptlen - areq_ctx->req_authsize,
 				size_to_skip + req->cryptlen, SSI_SG_TO_BUF);
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c
@ 2017-10-27 14:53 ` Stephen Brennan
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Brennan @ 2017-10-27 14:53 UTC (permalink / raw)
  To: Gilad Ben-Yossef, Greg Kroah-Hartman, linux-crypto,
	driverdev-devel, linux-kernel
  Cc: Stephen Brennan

In particular, fixes some over-indented if statement bodies as well as a
couple lines indented with spaces. checkpatch.pl now reports no warnings
on this file other than 80 character warnings.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
---
V2 also fixes an overlooked indentation error that checkpatch didn't catch.

 drivers/staging/ccree/ssi_buffer_mgr.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index dca3ce84d043..1f8a225530a8 100644
--- a/drivers/staging/ccree/ssi_buffer_mgr.c
+++ b/drivers/staging/ccree/ssi_buffer_mgr.c
@@ -406,8 +406,8 @@ ssi_aead_handle_config_buf(struct device *dev,
 	sg_init_one(&areq_ctx->ccm_adata_sg, config_data, AES_BLOCK_SIZE + areq_ctx->ccm_hdr_size);
 	if (unlikely(dma_map_sg(dev, &areq_ctx->ccm_adata_sg, 1,
 				DMA_TO_DEVICE) != 1)) {
-			dev_err(dev, "dma_map_sg() config buffer failed\n");
-			return -ENOMEM;
+		dev_err(dev, "dma_map_sg() config buffer failed\n");
+		return -ENOMEM;
 	}
 	dev_dbg(dev, "Mapped curr_buff: dma_address=%pad page=%p addr=%pK offset=%u length=%u\n",
 		&sg_dma_address(&areq_ctx->ccm_adata_sg),
@@ -435,8 +435,8 @@ static inline int ssi_ahash_handle_curr_buf(struct device *dev,
 	sg_init_one(areq_ctx->buff_sg, curr_buff, curr_buff_cnt);
 	if (unlikely(dma_map_sg(dev, areq_ctx->buff_sg, 1,
 				DMA_TO_DEVICE) != 1)) {
-			dev_err(dev, "dma_map_sg() src buffer failed\n");
-			return -ENOMEM;
+		dev_err(dev, "dma_map_sg() src buffer failed\n");
+		return -ENOMEM;
 	}
 	dev_dbg(dev, "Mapped curr_buff: dma_address=%pad page=%p addr=%pK offset=%u length=%u\n",
 		&sg_dma_address(areq_ctx->buff_sg), sg_page(areq_ctx->buff_sg),
@@ -1029,12 +1029,12 @@ static inline int ssi_buffer_mgr_prepare_aead_data_mlli(
 			 * verification is made by CPU compare in order to simplify
 			 * MAC verification upon request completion
 			 */
-			  u32 size_to_skip = req->assoclen;
+			u32 size_to_skip = req->assoclen;
 
-			  if (areq_ctx->is_gcm4543)
-				  size_to_skip += crypto_aead_ivsize(tfm);
+			if (areq_ctx->is_gcm4543)
+				size_to_skip += crypto_aead_ivsize(tfm);
 
-			  ssi_buffer_mgr_copy_scatterlist_portion(
+			ssi_buffer_mgr_copy_scatterlist_portion(
 				dev, areq_ctx->backup_mac, req->src,
 				size_to_skip + req->cryptlen - areq_ctx->req_authsize,
 				size_to_skip + req->cryptlen, SSI_SG_TO_BUF);
-- 
2.14.2


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-27 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27 14:53 [PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c Stephen Brennan
2017-10-27 14:53 ` Stephen Brennan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.