Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1736410 > unrolled thread

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

Started byJanani Sankara Babu <jananis37@gmail.com>
First post2017-09-21 08:50 +0200
Last post2017-09-22 13:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging:ccree Fix dont use assignment in if condition Janani Sankara Babu <jananis37@gmail.com> - 2017-09-21 08:50 +0200
    Re: [PATCH] staging:ccree Fix dont use assignment in if condition Greg KH <gregkh@linuxfoundation.org> - 2017-09-22 11:00 +0200
      Re: [PATCH] staging:ccree Fix dont use assignment in if condition Greg KH <gregkh@linuxfoundation.org> - 2017-09-22 13:00 +0200

#1736410 — [PATCH] staging:ccree Fix dont use assignment in if condition

FromJanani Sankara Babu <jananis37@gmail.com>
Date2017-09-21 08:50 +0200
Subject[PATCH] staging:ccree Fix dont use assignment in if condition
Message-ID<us3t8-5H4-25@gated-at.bofh.it>
This patch solves the following error shown by checkpatch script
ERROR: do not use assignment in if condition

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
 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

[toc] | [next] | [standalone]


#1737291

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-22 11:00 +0200
Message-ID<usrYu-3Z9-7@gated-at.bofh.it>
In reply to#1736410
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 <jananis37@gmail.com>
> ---
>  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

[toc] | [prev] | [next] | [standalone]


#1737405

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-09-22 13:00 +0200
Message-ID<ustQC-56i-9@gated-at.bofh.it>
In reply to#1737291
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web