2017-09-21 06:42:01

by Janani Sankara Babu

[permalink] [raw]
Subject: [PATCH] staging:ccree Fix dont use assignment in if condition

This patch solves the following error shown by checkpatch script
ERROR: do not use assignment in if condition

Signed-off-by: Janani Sankara Babu <[email protected]>
---
drivers/staging/ccree/ssi_hash.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index ae8f36a..08eaa56 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -601,8 +601,8 @@ static int ssi_hash_update(struct ahash_req_ctx *state,
/* no real updates required */
return 0;
}
-
- if (unlikely(rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, src, nbytes, block_size))) {
+ rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, src, nbytes, block_size);
+ if (unlikely(rc)) {
if (rc == 1) {
SSI_LOG_DEBUG(" data size not require HW update %x\n",
nbytes);
@@ -1403,8 +1403,8 @@ static int ssi_mac_update(struct ahash_request *req)
}

state->xcbc_count++;
-
- if (unlikely(rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, req->src, req->nbytes, block_size))) {
+ rc = ssi_buffer_mgr_map_hash_request_update(ctx->drvdata, state, req->src, req->nbytes, block_size);
+ if (unlikely(rc)) {
if (rc == 1) {
SSI_LOG_DEBUG(" data size not require HW update %x\n",
req->nbytes);
--
1.9.1


2017-09-22 08:54:55

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging:ccree Fix dont use assignment in if condition

On Thu, Sep 21, 2017 at 12:07:04PM +0530, Janani Sankara Babu wrote:
> This patch solves the following error shown by checkpatch script
> ERROR: do not use assignment in if condition
>
> Signed-off-by: Janani Sankara Babu <[email protected]>
> ---
> drivers/staging/ccree/ssi_hash.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

You sent me 5 patches for the same driver, yet no way for me to
determine what the order of the patches are. Please resend as a
numbered patch series so I get it right.

Remember, make it obvious what a maintainer is supposed to do...

thanks,

greg k-h

2017-09-22 10:58:58

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging:ccree Fix dont use assignment in if condition


A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?


http://daringfireball.net/2007/07/on_top

On Fri, Sep 22, 2017 at 03:52:45PM +0530, Janani Sankara Babu wrote:
> Hi Mr. Greg,
>
> ? ? ?The patches that I have sent are independent of each other. There is
> nothing ?from one patch that will affect the other one and vice verse. I have
> double checked the same.

And how am I supposed to know that? :)

> ? ? ?Kindly let me know if I have to do the ordering of patches.

Please do, they are long-gone from my queue now.

thanks,

greg k-h