linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error
@ 2015-03-13 21:38 Ameen Ali
  2015-03-16 10:50 ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Ameen Ali @ 2015-03-13 21:38 UTC (permalink / raw)
  To: tim.c.chen, herbert, davem, tglx, mingo, hpa, x86
  Cc: linux-crypto, linux-kernel, Ameen Ali

fixing a syntax-error .

Signed-off-by : Ameen Ali <AmeenAli023@gmail.com>
---
 arch/x86/crypto/sha-mb/sha1_mb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index fd9f6b0..ec0b989 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -828,7 +828,7 @@ static unsigned long sha1_mb_flusher(struct mcryptd_alg_cstate *cstate)
 	while (!list_empty(&cstate->work_list)) {
 		rctx = list_entry(cstate->work_list.next,
 				struct mcryptd_hash_request_ctx, waiter);
-		if time_before(cur_time, rctx->tag.expire)
+		if (time_before(cur_time, rctx->tag.expire))
 			break;
 		kernel_fpu_begin();
 		sha_ctx = (struct sha1_hash_ctx *) sha1_ctx_mgr_flush(cstate->mgr);
-- 
2.1.0


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

* Re: [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error
  2015-03-13 21:38 [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error Ameen Ali
@ 2015-03-16 10:50 ` Herbert Xu
  2015-03-16 11:28   ` Paul Bolle
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2015-03-16 10:50 UTC (permalink / raw)
  To: Ameen Ali
  Cc: tim.c.chen, davem, tglx, mingo, hpa, x86, linux-crypto, linux-kernel

On Fri, Mar 13, 2015 at 11:38:21PM +0200, Ameen Ali wrote:
> fixing a syntax-error .
> 
> Signed-off-by : Ameen Ali <AmeenAli023@gmail.com>

Applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error
  2015-03-16 10:50 ` Herbert Xu
@ 2015-03-16 11:28   ` Paul Bolle
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Bolle @ 2015-03-16 11:28 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Ameen Ali, tim.c.chen, davem, tglx, mingo, hpa, x86,
	linux-crypto, linux-kernel

On Mon, 2015-03-16 at 21:50 +1100, Herbert Xu wrote:
> On Fri, Mar 13, 2015 at 11:38:21PM +0200, Ameen Ali wrote:
> > fixing a syntax-error .
> > 
> > Signed-off-by : Ameen Ali <AmeenAli023@gmail.com>
> 
> Applied.

The commit summary and the commit explanation are a bit misleading. This
is not a syntax error: it actually compiles just fine with GCC 4.8. (I
looked into that wondering whether this was stable material.) It's
telling that the commit explanation doesn't contain a copy of the error
message, which would have been very helpful if this really was a syntax
error.

The old code apparently works because the preprocessor converts
time_before() into time_after(). And the code generated for time_after()
will in its turn be wrapped in parentheses. That is, this generates
valid syntax by, well, accident. So this could as well be labeled a
style fix. A fix for a rather serious style defect, but still.


Paul Bolle


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

* Re: [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error
  2015-03-13 21:13 Ameen Ali
@ 2015-03-13 21:33 ` Tim Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Chen @ 2015-03-13 21:33 UTC (permalink / raw)
  To: Ameen Ali; +Cc: tglx, mingo, hpa, linux-kernel, linux-crypto

On Fri, 2015-03-13 at 23:13 +0200, Ameen Ali wrote:
> fixing a syntax-error .
> 
> Signed-off-by : Ameen Ali <AmeenAli023@gmail.com>
> ---
>  arch/x86/crypto/sha-mb/sha1_mb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
> index fd9f6b0..ec0b989 100644
> --- a/arch/x86/crypto/sha-mb/sha1_mb.c
> +++ b/arch/x86/crypto/sha-mb/sha1_mb.c
> @@ -828,7 +828,7 @@ static unsigned long sha1_mb_flusher(struct mcryptd_alg_cstate *cstate)
>  	while (!list_empty(&cstate->work_list)) {
>  		rctx = list_entry(cstate->work_list.next,
>  				struct mcryptd_hash_request_ctx, waiter);
> -		if time_before(cur_time, rctx->tag.expire)
> +		if(time_before(cur_time, rctx->tag.expire))

Can you add a space and make it 
		if (time_before(cur_time, rctx->tag.expire))

Thanks.

Tim
>  			break;
>  		kernel_fpu_begin();
>  		sha_ctx = (struct sha1_hash_ctx *) sha1_ctx_mgr_flush(cstate->mgr);



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

* [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error
@ 2015-03-13 21:13 Ameen Ali
  2015-03-13 21:33 ` Tim Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Ameen Ali @ 2015-03-13 21:13 UTC (permalink / raw)
  To: tim.c.chen, tglx, mingo, hpa; +Cc: linux-kernel, linux-crypto, Ameen Ali

fixing a syntax-error .

Signed-off-by : Ameen Ali <AmeenAli023@gmail.com>
---
 arch/x86/crypto/sha-mb/sha1_mb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index fd9f6b0..ec0b989 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -828,7 +828,7 @@ static unsigned long sha1_mb_flusher(struct mcryptd_alg_cstate *cstate)
 	while (!list_empty(&cstate->work_list)) {
 		rctx = list_entry(cstate->work_list.next,
 				struct mcryptd_hash_request_ctx, waiter);
-		if time_before(cur_time, rctx->tag.expire)
+		if(time_before(cur_time, rctx->tag.expire))
 			break;
 		kernel_fpu_begin();
 		sha_ctx = (struct sha1_hash_ctx *) sha1_ctx_mgr_flush(cstate->mgr);
-- 
2.1.0


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

end of thread, other threads:[~2015-03-16 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 21:38 [PATCH 12/12] crypto/sha-mb/sha1_mb.c : Syntax error Ameen Ali
2015-03-16 10:50 ` Herbert Xu
2015-03-16 11:28   ` Paul Bolle
  -- strict thread matches above, loose matches on Subject: below --
2015-03-13 21:13 Ameen Ali
2015-03-13 21:33 ` Tim Chen

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).