* [PATCH] crypto: blowfish: Fixed a multi line macro issue @ 2011-04-07 6:49 Aditya Shevade 2011-04-08 12:45 ` Herbert Xu 0 siblings, 1 reply; 4+ messages in thread From: Aditya Shevade @ 2011-04-07 6:49 UTC (permalink / raw) To: Herbert Xu, David S. Miller; +Cc: linux-crypto, Aditya Shevade Fixed a multi line macro with do-while loop. Fixed some other minor tab related issues. Signed-off-by: Aditya Shevade <aditya.shevade@gmail.com> --- crypto/blowfish.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crypto/blowfish.c b/crypto/blowfish.c index a67d52e..5d9bc2e 100644 --- a/crypto/blowfish.c +++ b/crypto/blowfish.c @@ -309,9 +309,13 @@ static const u32 bf_sbox[256 * 4] = { #define GET32_0(x) (((x) >> (24)) & (0xff)) #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \ - S[512 + GET32_2(x)]) + S[768 + GET32_3(x)]) + S[512 + GET32_2(x)]) + S[768 + GET32_3(x)]) -#define ROUND(a, b, n) b ^= P[n]; a ^= bf_F (b) +#define ROUND(a, b, n) \ + do { \ + b ^= P[n]; \ + a ^= bf_F(b) \ + } while (0) /* * The blowfish encipher, processes 64-bit blocks. @@ -460,9 +464,9 @@ static struct crypto_alg alg = { .cra_u = { .cipher = { .cia_min_keysize = BF_MIN_KEY_SIZE, .cia_max_keysize = BF_MAX_KEY_SIZE, - .cia_setkey = bf_setkey, - .cia_encrypt = bf_encrypt, - .cia_decrypt = bf_decrypt } } + .cia_setkey = bf_setkey, + .cia_encrypt = bf_encrypt, + .cia_decrypt = bf_decrypt } } }; static int __init blowfish_mod_init(void) -- 1.7.4.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: blowfish: Fixed a multi line macro issue 2011-04-07 6:49 [PATCH] crypto: blowfish: Fixed a multi line macro issue Aditya Shevade @ 2011-04-08 12:45 ` Herbert Xu 2011-04-08 17:46 ` Aditya Shevade 0 siblings, 1 reply; 4+ messages in thread From: Herbert Xu @ 2011-04-08 12:45 UTC (permalink / raw) To: Aditya Shevade; +Cc: David S. Miller, linux-crypto On Wed, Apr 06, 2011 at 11:49:20PM -0700, Aditya Shevade wrote: > Fixed a multi line macro with do-while loop. > Fixed some other minor tab related issues. > > Signed-off-by: Aditya Shevade <aditya.shevade@gmail.com> Your patch doesn't even build! -- 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] 4+ messages in thread
* Re: [PATCH] crypto: blowfish: Fixed a multi line macro issue 2011-04-08 12:45 ` Herbert Xu @ 2011-04-08 17:46 ` Aditya Shevade 2011-04-08 17:53 ` David Miller 0 siblings, 1 reply; 4+ messages in thread From: Aditya Shevade @ 2011-04-08 17:46 UTC (permalink / raw) To: Herbert Xu; +Cc: David S. Miller, linux-crypto On Fri, Apr 8, 2011 at 5:45 AM, Herbert Xu <herbert@gondor.apana.org.au> wrote: > > On Wed, Apr 06, 2011 at 11:49:20PM -0700, Aditya Shevade wrote: > > Fixed a multi line macro with do-while loop. > > Fixed some other minor tab related issues. > > > > Signed-off-by: Aditya Shevade <aditya.shevade@gmail.com> > > Your patch doesn't even build! > -- > 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 Oh, I see the problem. I forgot a semicolon in the commit file. Making the change. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] crypto: blowfish: Fixed a multi line macro issue 2011-04-08 17:46 ` Aditya Shevade @ 2011-04-08 17:53 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2011-04-08 17:53 UTC (permalink / raw) To: aditya.shevade; +Cc: herbert, linux-crypto From: Aditya Shevade <aditya.shevade@gmail.com> Date: Fri, 8 Apr 2011 10:46:57 -0700 > Oh, I see the problem. I forgot a semicolon in the commit file. Making > the change. I think it's even more important that you are submitting patches you aren't even build testing. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-08 17:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-07 6:49 [PATCH] crypto: blowfish: Fixed a multi line macro issue Aditya Shevade 2011-04-08 12:45 ` Herbert Xu 2011-04-08 17:46 ` Aditya Shevade 2011-04-08 17:53 ` David Miller
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).