* [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c
@ 2017-10-27 1:53 Stephen Brennan
2017-10-27 8:32 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Brennan @ 2017-10-27 1: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>
---
Hello again, hoping these indentation issues are a bit more actionable than the
line length errors I was trying to fix in my previous patch. Again, thanks in
advance for taking the time to look!
drivers/staging/ccree/ssi_buffer_mgr.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
index dca3ce84d043..7c62255128d5 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,10 +1029,10 @@ 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(
dev, areq_ctx->backup_mac, req->src,
--
2.14.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c
2017-10-27 1:53 [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c Stephen Brennan
@ 2017-10-27 8:32 ` Dan Carpenter
2017-10-27 14:23 ` Joe Perches
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2017-10-27 8:32 UTC (permalink / raw)
To: Stephen Brennan
Cc: Gilad Ben-Yossef, Greg Kroah-Hartman, linux-crypto,
driverdev-devel, linux-kernel
On Thu, Oct 26, 2017 at 06:53:42PM -0700, Stephen Brennan wrote:
> 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>
> ---
> Hello again, hoping these indentation issues are a bit more actionable than the
> line length errors I was trying to fix in my previous patch. Again, thanks in
> advance for taking the time to look!
>
> drivers/staging/ccree/ssi_buffer_mgr.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
> index dca3ce84d043..7c62255128d5 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;
So far so good.
> }
> 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,10 +1029,10 @@ 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(
> dev, areq_ctx->backup_mac, req->src,
But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented
correctly.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c
2017-10-27 8:32 ` Dan Carpenter
@ 2017-10-27 14:23 ` Joe Perches
2017-10-27 14:42 ` Stephen Brennan
0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2017-10-27 14:23 UTC (permalink / raw)
To: Dan Carpenter, Stephen Brennan
Cc: Gilad Ben-Yossef, Greg Kroah-Hartman, linux-crypto,
driverdev-devel, linux-kernel
On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote:
> On Thu, Oct 26, 2017 at 06:53:42PM -0700, Stephen Brennan wrote:
> > 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.
[]
> > diff --git a/drivers/staging/ccree/ssi_buffer_mgr.c b/drivers/staging/ccree/ssi_buffer_mgr.c
[]
> > @@ -1029,10 +1029,10 @@ 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(
> > dev, areq_ctx->backup_mac, req->src,
>
> But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented
> correctly.
The latest version of checkpatch should bleat something on the
...scatterlist_portion(
line
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c
2017-10-27 14:23 ` Joe Perches
@ 2017-10-27 14:42 ` Stephen Brennan
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Brennan @ 2017-10-27 14:42 UTC (permalink / raw)
To: Joe Perches
Cc: Dan Carpenter, Gilad Ben-Yossef, Greg Kroah-Hartman, linux-crypto,
driverdev-devel, linux-kernel
On Fri, Oct 27, 2017 at 07:23:58AM -0700, Joe Perches wrote:
> On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote:
> > But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented
> > correctly.
Yeah, I don't know how I missed it. I'll send a new version of the patch
out momentarily.
> The latest version of checkpatch should bleat something on the
> ...scatterlist_portion(
> line
Strangely, my checkpatch doesn't complain about it, but I guess you can't
always rely on tools for this stuff. For reference, I'm currently on the
10/18 linux-next branch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-27 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-27 1:53 [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c Stephen Brennan
2017-10-27 8:32 ` Dan Carpenter
2017-10-27 14:23 ` Joe Perches
2017-10-27 14:42 ` Stephen Brennan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).